This commit is contained in:
Add00
2023-07-31 13:16:01 -04:00
14 changed files with 64 additions and 63 deletions

View File

@@ -0,0 +1,11 @@
//test for casting + grouping, see #67
{
assert string(10 % 4) == "2", "basic group casting failed";
assert string 4 == "4", "normal casting failed";
assert typeof string(10 % 4) == string, "group casting type failed";
}
print "All good";

View File

@@ -1,5 +1,5 @@
import about as about;
import about;
import toy_version_info as toy_version_info;
import toy_version_info;
assert author == "Kayne Ruse, KR Game Studios", "Author failed";

View File

@@ -119,6 +119,7 @@ int main() {
"dottify-bugfix.toy",
"function-within-function-bugfix.toy",
"functions.toy",
"group-casting-bugfix.toy",
"increment-postfix-bugfix.toy",
"index-arrays.toy",
"index-assignment-both-bugfix.toy",

View File

@@ -14,10 +14,10 @@
#include "../repl/repl_tools.h"
#include "../repl/drive_system.h"
#include "../repl/lib_about.h"
#include "../repl/lib_toy_version_info.h"
#include "../repl/lib_standard.h"
#include "../repl/lib_random.h"
#include "../repl/lib_runner.h"
#include "../repl/lib_standard.h"
//supress the print output
static void noPrintFn(const char* output) {
@@ -72,7 +72,7 @@ int main() {
//run each file in test/scripts
Payload payloads[] = {
{"interactions.toy", "standard", Toy_hookStandard}, //interactions needs standard
{"about.toy", "about", Toy_hookAbout},
{"toy_version_info.toy", "toy_version_info", Toy_hookToyVersionInfo},
{"standard.toy", "standard", Toy_hookStandard},
{"runner.toy", "runner", Toy_hookRunner},
{"random.toy", "random", Toy_hookRandom},