diff --git a/Task 1/unittest_1.cpp b/Task 1/unittest_1.cpp index 6220680ce849a8e485b4b527ab4f7ae64cd15d2e..5c552f3c97626f33dbe9cf1e6650d6f151485dad 100644 --- a/Task 1/unittest_1.cpp +++ b/Task 1/unittest_1.cpp @@ -27,24 +27,6 @@ DEFINE_TEST(TestFiberStackAlignment) { TEST_EQ(stackPtr % 16, 0); // Stack should be 16-byte aligned } -// Test Fiber Stack Alignment and Pointer Position -DEFINE_TEST(TestFiberStackAlignmentAndPosition) { - Fiber testFiber([](Context* mainContext, Context* selfContext) { - // Dummy function for fiber - }); - - uintptr_t stackPtr = reinterpret_cast<uintptr_t>(testFiber.context.rsp); - - // Check alignment - TEST_EQ(stackPtr % 16, 0); // Stack should be 16-byte aligned - - // Assuming the stack grows downwards, stackPtr should be less than the address of stack[] - uintptr_t stackArrayPtr = reinterpret_cast<uintptr_t>(testFiber.stack); - TEST(stackPtr < stackArrayPtr); - TEST(stackPtr >= stackArrayPtr - StackSize); // Within the bounds of the stack -} - - // Test Fiber Context Initialization DEFINE_TEST(TestFiberContextInitialization) { Fiber testFiber([](Context* mc, Context* sc){ swap_context(sc, mc); });