diff options
author | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-07 16:32:46 +0200 |
---|---|---|
committer | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-07 19:36:01 +0200 |
commit | a690aeeddc70c51b814999ec8c3d2093e85ed647 (patch) | |
tree | 4862c9d48737150b0948277f0db3fca6caa4fcaa /tests | |
parent | 75410f1c96a9216a2b597efec1a6128b3bc7c826 (diff) |
Use do_run_from_file() for test_direct_string_constant_usage
Diffstat (limited to 'tests')
-rw-r--r-- | tests/core/test_direct_string_constant_usage.in | 13 | ||||
-rw-r--r-- | tests/core/test_direct_string_constant_usage.out | 1 | ||||
-rw-r--r-- | tests/test_core.py | 18 |
3 files changed, 18 insertions, 14 deletions
diff --git a/tests/core/test_direct_string_constant_usage.in b/tests/core/test_direct_string_constant_usage.in new file mode 100644 index 00000000..e43232f0 --- /dev/null +++ b/tests/core/test_direct_string_constant_usage.in @@ -0,0 +1,13 @@ + + #include <iostream> + template<int i> + void printText( const char (&text)[ i ] ) + { + std::cout << text; + } + int main() + { + printText( "some string constant" ); + return 0; + } +
\ No newline at end of file diff --git a/tests/core/test_direct_string_constant_usage.out b/tests/core/test_direct_string_constant_usage.out new file mode 100644 index 00000000..ddb4b681 --- /dev/null +++ b/tests/core/test_direct_string_constant_usage.out @@ -0,0 +1 @@ +some string constant
\ No newline at end of file diff --git a/tests/test_core.py b/tests/test_core.py index f3b036eb..2292676a 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -4020,20 +4020,10 @@ def process(filename): def test_direct_string_constant_usage(self): if self.emcc_args is None: return self.skip('requires libcxx') - src = ''' - #include <iostream> - template<int i> - void printText( const char (&text)[ i ] ) - { - std::cout << text; - } - int main() - { - printText( "some string constant" ); - return 0; - } - ''' - self.do_run(src, "some string constant") + test_path = path_from_root('tests', 'core', 'test_direct_string_constant_usage') + src, output = (test_path + s for s in ('.in', '.out')) + + self.do_run_from_file(src, output) def test_std_cout_new(self): if self.emcc_args is None: return self.skip('requires emcc') |