mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Reworked the tests, read more
I've brought the tests up to scratch, except for compounds im the parser, because I'm too damn tired to do that over SSH. It looks like collections are right-recursive, whixh was unintended but still works just fine. I've also added the '--verbose' flag to the repl to control the debugging output. Several obscure bugs have been fixed, and comments have been tweaked. Mustfail tests are still needed, but that's a low priority. See #142. Fixed #151
This commit is contained in:
@@ -455,6 +455,11 @@ int test_binary(Toy_Bucket** bucketHandle) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int test_compound(Toy_Bucket** bucketHandle) {
|
||||
//TODO: fix test_compound()
|
||||
return 0;
|
||||
}
|
||||
|
||||
int test_precedence(Toy_Bucket** bucketHandle) {
|
||||
//test term-factor precedence
|
||||
{
|
||||
@@ -624,8 +629,6 @@ int main() {
|
||||
total += res;
|
||||
}
|
||||
|
||||
//TODO: assign & compare?
|
||||
|
||||
{
|
||||
Toy_Bucket* bucket = Toy_allocateBucket(TOY_BUCKET_IDEAL);
|
||||
res = test_values(&bucket);
|
||||
@@ -656,6 +659,16 @@ int main() {
|
||||
total += res;
|
||||
}
|
||||
|
||||
{
|
||||
Toy_Bucket* bucket = Toy_allocateBucket(TOY_BUCKET_IDEAL);
|
||||
res = test_compound(&bucket);
|
||||
Toy_freeBucket(&bucket);
|
||||
if (res == 0) {
|
||||
printf(TOY_CC_NOTICE "All good\n" TOY_CC_RESET);
|
||||
}
|
||||
total += res;
|
||||
}
|
||||
|
||||
{
|
||||
Toy_Bucket* bucket = Toy_allocateBucket(TOY_BUCKET_IDEAL);
|
||||
res = test_precedence(&bucket);
|
||||
|
||||
Reference in New Issue
Block a user