Commit fffe7908 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

[Tests] interpreter-test: check result, out & err

parent 2d72aca1
...@@ -15,8 +15,13 @@ int main(int argc, char** argv) { ...@@ -15,8 +15,13 @@ int main(int argc, char** argv) {
for (int i = 0; i < numTest; ++i) { for (int i = 0; i < numTest; ++i) {
// correct input // correct input
interp.python("print('I am the interpreter')", result, out, err); interp.python("print('I am the interpreter')", result, out, err);
assert(out.compare("I am the interpreter"));
assert(err.length() == 0);
// incorrect input // incorrect input
interp.python("print I am the interpreter", result, out, err); interp.python("print I am the interpreter", result, out, err);
assert(result.length() == 0);
assert(out.length() == 0);
assert(err.length() > 50);
} }
return 0; return 0;
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment