Exemplo n.º 1
0
"""
dontcare feature

Following Perl code prints something like "HASH(0x7fc5a9003ea0)" but if changes.
We need to ignore the change.
"""
from coderunner import test, Perl, main

test(Perl, """
$x = {};
print "$x\n";
""", """
HASH(0x7fc5a9003ea0)
""")

main()
Exemplo n.º 2
0
from coderunner import test, Cpp, main

test(Cpp, "raii.cpp", """
scenario1: normal case
try to open
open
try to use
use
close


scenario2: failed to open
try to open
throw
exception caught: error on open


scenario3: opened, but failed to use
try to open
open
try to use
throw
close
exception caught: error on use
""", is_file=True)

main()