From d56a2f7a032c9433bbc11188b847ee1704d8b526 Mon Sep 17 00:00:00 2001 From: Hofmann Jonas Date: Tue, 9 Dec 2025 00:44:04 +0100 Subject: [PATCH] adding double working, double not Permitted not working --- bintreeTests.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bintreeTests.c b/bintreeTests.c index 24f2c1e..f8b61ba 100644 --- a/bintreeTests.c +++ b/bintreeTests.c @@ -64,10 +64,10 @@ void test_addToTreeExpandsTreeCorrectly(void) testRoot = addToTree(testRoot, &score6, sizeof(int), compareIntEntries, NULL); printf("add6passed\n"); - /* + testRoot = addToTree(testRoot, &score7, sizeof(int), compareIntEntries, NULL); printf("add7passed\n"); - */ + // Checking the Tree without Doubles TEST_ASSERT_NOT_NULL(testRoot); @@ -93,24 +93,24 @@ void test_addToTreeExpandsTreeCorrectly(void) TEST_ASSERT_NOT_NULL(testRoot->right->left); TEST_ASSERT_EQUAL_UINT16(score6, testRoot->right->left->data); printf("node6passed\n"); - /* + TEST_ASSERT_NOT_NULL(testRoot->right->right); TEST_ASSERT_EQUAL_UINT16(score7, testRoot->right->right->data); printf("node7passed\n"); - /* + // Adding Double testRoot = addToTree(testRoot, &score4, sizeof(int), compareIntEntries, NULL); 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 testRoot = addToTree(testRoot, &score7, sizeof(int), compareIntEntries, testIsDouble); TEST_ASSERT_NULL(testRoot->right->right->left); TEST_ASSERT_EQUAL_UINT16(1, testIsDouble); - clearTree(testRoot); - // */ + //clearTree(testRoot); + }