Started working on Toy_Scope, incomplete

I only worked for a couple hours today.
This commit is contained in:
2024-10-10 22:53:49 +11:00
parent e6fa345fe6
commit 8d1e4d647b
8 changed files with 220 additions and 45 deletions

View File

@@ -106,7 +106,7 @@ int test_string_allocation() {
Toy_Bucket* bucket = Toy_allocateBucket(TOY_BUCKET_IDEAL);
const char* cstring = "Hello world";
Toy_String* str = Toy_createNameString(&bucket, cstring);
Toy_String* str = Toy_createNameString(&bucket, cstring, TOY_VALUE_NULL);
//shallow and deep
Toy_String* shallow = Toy_copyString(&bucket, str);
@@ -652,9 +652,9 @@ int test_string_equality() {
{
//setup
Toy_Bucket* bucket = Toy_allocateBucket(TOY_BUCKET_IDEAL);
Toy_String* helloWorldOne = Toy_createNameString(&bucket, "Hello world");
Toy_String* helloWorldTwo = Toy_createNameString(&bucket, "Hello world");
Toy_String* helloEveryone = Toy_createNameString(&bucket, "Hello everyone");
Toy_String* helloWorldOne = Toy_createNameString(&bucket, "Hello world", TOY_VALUE_NULL);
Toy_String* helloWorldTwo = Toy_createNameString(&bucket, "Hello world", TOY_VALUE_NULL);
Toy_String* helloEveryone = Toy_createNameString(&bucket, "Hello everyone", TOY_VALUE_NULL); //TODO: compare types?
int result = 0; //for print the errors