#include #include #include #define Pi 3.141592653589 #include "plist.c" int main(){ triangle T; word w; printf("Begin test of general_strong_test in check.c\n"); word_empty(&w); word_addLetter(&w,0); word_addLetter(&w,1); word_addLetter(&w,2); word_addLetter(&w,0); word_addLetter(&w,1); word_addLetter(&w,2); printf("the word w is "); word_print_file(stdout,&w); printf("T is an acute triangle\n"); T.z[0].x=0.; T.z[0].y=0.; T.z[1].x=1.; T.z[1].y=0.; T.z[2].x=.5; T.z[2].y=1.; if (general_strong_test(w,T)) printf("(w,T) passes the strong test\n"); else { printf("(w,T) fails the strong test\n"); printf("WRONG!!!!!!!!\n"); } printf("T is an obtuse triangle\n"); T.z[0].x=0.; T.z[0].y=0.; T.z[1].x=1.; T.z[1].y=0.; T.z[2].x=1.5; T.z[2].y=1.; if (general_strong_test(w,T)){ printf("(w,T) passes the strong test\n"); printf("WRONG!!!!!!!!\n"); } else { printf("(w,T) fails the strong test\n"); } printf("End test of general_strong_test in check.c\n"); return 0; }