adding double working, double not Permitted not working

This commit is contained in:
Jonas Hofmann 2025-12-09 00:44:04 +01:00
parent 36ac0d6d9d
commit d56a2f7a03

View File

@ -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,15 +93,15 @@ 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);
@ -109,8 +109,8 @@ void test_addToTreeExpandsTreeCorrectly(void)
TEST_ASSERT_EQUAL_UINT16(1, testIsDouble); TEST_ASSERT_EQUAL_UINT16(1, testIsDouble);
clearTree(testRoot); //clearTree(testRoot);
// */
} }