aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-xtests/runner.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index ea7a72f4..0dde33c0 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -3742,6 +3742,28 @@ def process(filename):
}
'''
self.do_run(src, "some string constant")
+
+ def test_istream(self):
+ if self.emcc_args is None: return self.skip('requires libcxx')
+
+ src = '''
+ #include <string>
+ #include <sstream>
+ #include <iostream>
+
+ int main()
+ {
+ std::string mystring("1 2 3");
+ std::istringstream is(mystring);
+ int one, two, three;
+
+ is >> one >> two >> three;
+
+ printf( "%i %i %i", one, two, three );
+ }
+ '''
+ self.do_run(src, "1 2 3")
+
def test_fs_base(self):
Settings.INCLUDE_FULL_LIBRARY = 1