summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/core/test_emptyclass.in15
-rw-r--r--tests/core/test_emptyclass.out1
-rw-r--r--tests/test_core.py17
3 files changed, 19 insertions, 14 deletions
diff --git a/tests/core/test_emptyclass.in b/tests/core/test_emptyclass.in
new file mode 100644
index 00000000..24a550db
--- /dev/null
+++ b/tests/core/test_emptyclass.in
@@ -0,0 +1,15 @@
+
+ #include <stdio.h>
+
+ struct Randomized {
+ Randomized(int x) {
+ printf("*zzcheezzz*\n");
+ }
+ };
+
+ int main( int argc, const char *argv[] ) {
+ new Randomized(55);
+
+ return 0;
+ }
+ \ No newline at end of file
diff --git a/tests/core/test_emptyclass.out b/tests/core/test_emptyclass.out
new file mode 100644
index 00000000..1be15e15
--- /dev/null
+++ b/tests/core/test_emptyclass.out
@@ -0,0 +1 @@
+*zzcheezzz* \ No newline at end of file
diff --git a/tests/test_core.py b/tests/test_core.py
index 911c7a68..b72ae793 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -1545,22 +1545,11 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
def test_emptyclass(self):
if self.emcc_args is None: return self.skip('requires emcc')
- src = '''
- #include <stdio.h>
-
- struct Randomized {
- Randomized(int x) {
- printf("*zzcheezzz*\\n");
- }
- };
- int main( int argc, const char *argv[] ) {
- new Randomized(55);
+ test_path = path_from_root('tests', 'core', 'test_emptyclass')
+ src, output = (test_path + s for s in ('.in', '.out'))
- return 0;
- }
- '''
- self.do_run(src, '*zzcheezzz*')
+ self.do_run_from_file(src, output)
def test_alloca(self):
src = '''