adding double working, double not Permitted not working
This commit is contained in:
parent
36ac0d6d9d
commit
d56a2f7a03
@ -64,10 +64,10 @@ void test_addToTreeExpandsTreeCorrectly(void)
|
|||||||
|
|
||||||
testRoot = addToTree(testRoot, &score6, sizeof(int), compareIntEntries, NULL);
|
testRoot = addToTree(testRoot, &score6, sizeof(int), compareIntEntries, NULL);
|
||||||
printf("add6passed\n");
|
printf("add6passed\n");
|
||||||
/*
|
|
||||||
testRoot = addToTree(testRoot, &score7, sizeof(int), compareIntEntries, NULL);
|
testRoot = addToTree(testRoot, &score7, sizeof(int), compareIntEntries, NULL);
|
||||||
printf("add7passed\n");
|
printf("add7passed\n");
|
||||||
*/
|
|
||||||
|
|
||||||
// Checking the Tree without Doubles
|
// Checking the Tree without Doubles
|
||||||
TEST_ASSERT_NOT_NULL(testRoot);
|
TEST_ASSERT_NOT_NULL(testRoot);
|
||||||
@ -93,24 +93,24 @@ void test_addToTreeExpandsTreeCorrectly(void)
|
|||||||
TEST_ASSERT_NOT_NULL(testRoot->right->left);
|
TEST_ASSERT_NOT_NULL(testRoot->right->left);
|
||||||
TEST_ASSERT_EQUAL_UINT16(score6, testRoot->right->left->data);
|
TEST_ASSERT_EQUAL_UINT16(score6, testRoot->right->left->data);
|
||||||
printf("node6passed\n");
|
printf("node6passed\n");
|
||||||
/*
|
|
||||||
TEST_ASSERT_NOT_NULL(testRoot->right->right);
|
TEST_ASSERT_NOT_NULL(testRoot->right->right);
|
||||||
TEST_ASSERT_EQUAL_UINT16(score7, testRoot->right->right->data);
|
TEST_ASSERT_EQUAL_UINT16(score7, testRoot->right->right->data);
|
||||||
printf("node7passed\n");
|
printf("node7passed\n");
|
||||||
/*
|
|
||||||
// Adding Double
|
// Adding Double
|
||||||
testRoot = addToTree(testRoot, &score4, sizeof(int), compareIntEntries, NULL);
|
testRoot = addToTree(testRoot, &score4, sizeof(int), compareIntEntries, NULL);
|
||||||
TEST_ASSERT_NOT_NULL(testRoot->left->left->left);
|
TEST_ASSERT_NOT_NULL(testRoot->left->left->left);
|
||||||
TEST_ASSERT_EQUAL_UINT16(score4, testRoot->left->left->left);
|
TEST_ASSERT_EQUAL_UINT16(score4, testRoot->left->left->left->data);
|
||||||
|
|
||||||
// Trying to add Double while Doubles not Permitted
|
// Trying to add Double while Doubles not Permitted
|
||||||
testRoot = addToTree(testRoot, &score7, sizeof(int), compareIntEntries, testIsDouble);
|
testRoot = addToTree(testRoot, &score7, sizeof(int), compareIntEntries, testIsDouble);
|
||||||
TEST_ASSERT_NULL(testRoot->right->right->left);
|
TEST_ASSERT_NULL(testRoot->right->right->left);
|
||||||
TEST_ASSERT_EQUAL_UINT16(1, testIsDouble);
|
TEST_ASSERT_EQUAL_UINT16(1, testIsDouble);
|
||||||
|
|
||||||
|
|
||||||
clearTree(testRoot);
|
//clearTree(testRoot);
|
||||||
// */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user