13 lines
336 B
C++
13 lines
336 B
C++
|
#ifdef TESTS_BUILD
|
||
|
#include <catch.hpp>
|
||
|
#include "../src/Script.hpp"
|
||
|
|
||
|
TEST_CASE( "Simple addition", "[integration]" ) {
|
||
|
Script script = Script::Create("1 + 5");
|
||
|
REQUIRE(!script.Diagnostics -> HasErrors());
|
||
|
script.Evaluate();
|
||
|
auto lastValue = script.GetLastValue();
|
||
|
REQUIRE(*any_cast<long>(lastValue) == 6);
|
||
|
}
|
||
|
#endif
|