diff options
-rw-r--r-- | tests/core/test_cxx03_do_run.in | 12 | ||||
-rw-r--r-- | tests/core/test_cxx03_do_run.out | 1 | ||||
-rw-r--r-- | tests/test_core.py | 15 |
3 files changed, 16 insertions, 12 deletions
diff --git a/tests/core/test_cxx03_do_run.in b/tests/core/test_cxx03_do_run.in new file mode 100644 index 00000000..ec7d1189 --- /dev/null +++ b/tests/core/test_cxx03_do_run.in @@ -0,0 +1,12 @@ + + #include <stdio.h> + + #if __cplusplus != 199711L + #error By default, if no -std is specified, emscripten should be compiling with -std=c++03! + #endif + + int main( int argc, const char *argv[] ) { + printf("Hello world!\n"); + return 0; + } +
\ No newline at end of file diff --git a/tests/core/test_cxx03_do_run.out b/tests/core/test_cxx03_do_run.out new file mode 100644 index 00000000..6769dd60 --- /dev/null +++ b/tests/core/test_cxx03_do_run.out @@ -0,0 +1 @@ +Hello world!
\ No newline at end of file diff --git a/tests/test_core.py b/tests/test_core.py index f85858e5..e584df74 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -2018,19 +2018,10 @@ def process(filename): # with Clang 3.2 -std=c++11 has been chosen as default, because of # < jrose> clb: it's deliberate, with the idea that for people who don't care about the standard, they should be using the "best" thing we can offer on that platform def test_cxx03_do_run(self): - src = ''' - #include <stdio.h> - - #if __cplusplus != 199711L - #error By default, if no -std is specified, emscripten should be compiling with -std=c++03! - #endif + test_path = path_from_root('tests', 'core', 'test_cxx03_do_run') + src, output = (test_path + s for s in ('.in', '.out')) - int main( int argc, const char *argv[] ) { - printf("Hello world!\\n"); - return 0; - } - ''' - self.do_run(src, 'Hello world!') + self.do_run_from_file(src, output) def test_bigswitch(self): if self.run_name != 'default': return self.skip('TODO: issue #781') |