#include "include/test.h" #include "../src/include/tokenize.h" #include "../src/include/parser.h" #include "../src/include/interpreter.h" int execute(string s) { vector tokens = tokenize(s); Node ast = parse(tokens); EvalResult res = eval(ast); return get(res); } int main() { _TEST_PRESENTATION("Variables"); _TEST_ASSERT(execute("int uneVariableFarfelue__ = 12;") == 12, "Déclaration avec assignement"); _TEST_ASSERT(execute("int x = 5; x + 3;") == 8, "Déclaration puis assignement"); return 0; }