File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 34
34
using namespace std;
35
35
using namespace solidity::test;
36
36
37
+ #define TEST_CASE_NAME (boost::unit_test::framework::current_test_case().p_name)
38
+
37
39
namespace solidity::util::test
38
40
{
39
41
40
42
BOOST_AUTO_TEST_SUITE(CommonIOTest)
41
43
42
44
BOOST_AUTO_TEST_CASE(readFileAsString_regular_file)
43
45
{
44
- TemporaryDirectory tempDir("common-io-test-" );
46
+ TemporaryDirectory tempDir(TEST_CASE_NAME );
45
47
createFileWithContent(tempDir.path() / "test.txt", "ABC\ndef\n");
46
48
47
49
BOOST_TEST(readFileAsString(tempDir.path() / "test.txt") == "ABC\ndef\n");
48
50
}
49
51
50
52
BOOST_AUTO_TEST_CASE(readFileAsString_directory)
51
53
{
52
- TemporaryDirectory tempDir("common-io-test-" );
54
+ TemporaryDirectory tempDir(TEST_CASE_NAME );
53
55
BOOST_CHECK_THROW(readFileAsString(tempDir.path()), NotAFile);
54
56
}
55
57
56
58
BOOST_AUTO_TEST_CASE(readFileAsString_symlink)
57
59
{
58
- TemporaryDirectory tempDir("common-io-test-" );
60
+ TemporaryDirectory tempDir(TEST_CASE_NAME );
59
61
createFileWithContent(tempDir.path() / "test.txt", "ABC\ndef\n");
60
62
61
63
if (!createSymlinkIfSupportedByFilesystem("test.txt", tempDir.path() / "symlink.txt", false))
You can’t perform that action at this time.
0 commit comments