mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Reworking structures for easy testing, read more
I was reworking bits of the containers to address issue #131, then realized that the table's tests depended on a specific initial size. I'm too buggered to finish it tonight, so I'll fix it tomorrow.
This commit is contained in:
@@ -11,7 +11,7 @@ int test_stack_basics() {
|
||||
//check if it worked
|
||||
if (
|
||||
stack == NULL ||
|
||||
stack->capacity != 64 ||
|
||||
stack->capacity != 8 ||
|
||||
stack->count != 0)
|
||||
{
|
||||
fprintf(stderr, TOY_CC_ERROR "ERROR: failed to allocate Toy_Stack\n" TOY_CC_RESET);
|
||||
@@ -32,7 +32,7 @@ int test_stack_basics() {
|
||||
Toy_pushStack(&stack, TOY_VALUE_FROM_INTEGER(420));
|
||||
if (
|
||||
stack == NULL ||
|
||||
stack->capacity != 64 ||
|
||||
stack->capacity != 8 ||
|
||||
stack->count != 3)
|
||||
{
|
||||
fprintf(stderr, TOY_CC_ERROR "ERROR: failed to push Toy_Stack\n" TOY_CC_RESET);
|
||||
@@ -55,7 +55,7 @@ int test_stack_basics() {
|
||||
Toy_Value top2 = Toy_popStack(&stack);
|
||||
if (
|
||||
stack == NULL ||
|
||||
stack->capacity != 64 ||
|
||||
stack->capacity != 8 ||
|
||||
stack->count != 2 ||
|
||||
TOY_VALUE_IS_INTEGER(top2) != true ||
|
||||
TOY_VALUE_AS_INTEGER(top2) != 420)
|
||||
|
||||
Reference in New Issue
Block a user