Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///////////////////////////////////////
- // Test Clip Operater() Line Segment //
- ///////////////////////////////////////
- std::cout << "TESTING OPERATOR()" << std::endl << std::endl;
- std::cout << "--TEST 7--" << std::endl;
- Point Points[3] = { c, a, b };
- Clip Triangle(3, Points);
- Point R(-2, -2), S(1, 1);
- if (Triangle(R, S))
- {
- std::cout << "--PASS TEST 7 PART 1 : A is outside, B is inside--" << std::endl;
- if (R.x == -1 && R.y == -1 && S.x == 1 && S.y == 1)
- std::cout << "--PASS TEST 7 PART 2--" << std::endl << std::endl;
- else
- std::cout << "--FAIL TEST 7: PART 2 FAIL--" << std::endl << std::endl;
- }
- else
- std::cout << "--FAIL TEST 7: PART 1 FAIL--" << std::endl << std::endl;
- std::cout << "Press ENTER to continue...";
- std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement