mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
43 lines
931 B
C++
43 lines
931 B
C++
#include <cxxtest/TestSuite.h>
|
|
|
|
//
|
|
// This test suite demonstrates TS_ASSERT_SAME_FILES
|
|
//
|
|
|
|
class SameFiles : public CxxTest::TestSuite
|
|
{
|
|
public:
|
|
|
|
void testAssertFiles()
|
|
{
|
|
TS_ASSERT_SAME_FILES("SameFiles.h", "SameFiles.h");
|
|
}
|
|
|
|
void testAssertFileShorter()
|
|
{
|
|
TS_ASSERT_SAME_FILES("SameFiles.h", "SameFilesLonger.h");
|
|
}
|
|
|
|
void testAssertFileLonger()
|
|
{
|
|
TS_ASSERT_SAME_FILES("SameFilesLonger.h", "SameFiles.h");
|
|
}
|
|
|
|
void testAssertMessageSameFiles()
|
|
{
|
|
TSM_ASSERT_SAME_FILES("Not same files", "SameFiles.h", "SameData.h");
|
|
}
|
|
|
|
void testSafeAssertSameFiles()
|
|
{
|
|
ETS_ASSERT_SAME_FILES("SameFiles.h", "SameFiles.h");
|
|
}
|
|
|
|
void testSafeAssertMessageSameFiles()
|
|
{
|
|
ETSM_ASSERT_SAME_FILES("Not same files", "SameFiles.h", "SameData.h");
|
|
}
|
|
};
|
|
|
|
// This is a bit longer than SameFiles.h, so we can test the logic of file comparison
|