Advertisement
Guest User

Untitled

a guest
Jul 12th, 2014
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. ///////////////////////////////////////
  2. // Test Clip Operater() Line Segment //
  3. ///////////////////////////////////////
  4.  
  5. std::cout << "TESTING OPERATOR()" << std::endl << std::endl;
  6.  
  7. std::cout << "--TEST 7--" << std::endl;
  8. Point Points[3] = { c, a, b };
  9.  
  10. Clip Triangle(3, Points);
  11.  
  12. Point R(-2, -2), S(1, 1);
  13. if (Triangle(R, S))
  14. {
  15. std::cout << "--PASS TEST 7 PART 1 : A is outside, B is inside--" << std::endl;
  16. if (R.x == -1 && R.y == -1 && S.x == 1 && S.y == 1)
  17. std::cout << "--PASS TEST 7 PART 2--" << std::endl << std::endl;
  18. else
  19. std::cout << "--FAIL TEST 7: PART 2 FAIL--" << std::endl << std::endl;
  20. }
  21. else
  22. std::cout << "--FAIL TEST 7: PART 1 FAIL--" << std::endl << std::endl;
  23.  
  24. std::cout << "Press ENTER to continue...";
  25. std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement