Revision: 49039
          http://brlcad.svn.sourceforge.net/brlcad/?rev=49039&view=rev
Author:   erikgreenwald
Date:     2012-01-24 17:49:00 +0000 (Tue, 24 Jan 2012)
Log Message:
-----------
test triangle foo values. add ansi color codes to summary and macroize a bit.

Modified Paths:
--------------
    brlcad/trunk/src/libgcv/test_bottess.c

Modified: brlcad/trunk/src/libgcv/test_bottess.c
===================================================================
--- brlcad/trunk/src/libgcv/test_bottess.c      2012-01-24 16:49:34 UTC (rev 
49038)
+++ brlcad/trunk/src/libgcv/test_bottess.c      2012-01-24 17:49:00 UTC (rev 
49039)
@@ -219,11 +219,11 @@
     {
        struct face_s f;
        int tri;
-#define ZORF(XVAL,ZVAL,LR) VSET(f.vert[0], 0,0,0); VSET(f.vert[1], 0,1,0); 
VSET(f.vert[2], XVAL,0,ZVAL); tri = find_tri(&LR, &f, &t); if(tri==-1) { 
count++; printf("\033[1;31mFAILURE\033[m\n"); } else printf("tri.fu: %x\n", 
l.faces[tri].foo);
-       ZORF(1,0,l);
-       ZORF(-1,0,l);
-       ZORF(0,-1,r);
-       ZORF(0,1,r);
+#define ZORF(XVAL,ZVAL,LR,FU) VSET(f.vert[0], 0,0,0); VSET(f.vert[1], 0,1,0); 
VSET(f.vert[2], XVAL,0,ZVAL); tri = find_tri(&LR, &f, &t); if(tri==-1 || 
l.faces[tri].foo != FU) { count++; printf("\033[1;31mFAILURE\033[m\n"); }
+       ZORF(1,0,l,INSIDE);
+       ZORF(-1,0,l,OUTSIDE);
+       ZORF(0,-1,r,OUTSIDE);
+       ZORF(0,1,r,INSIDE);
 #undef ZORF
     }
 
@@ -233,9 +233,11 @@
 int
 main(void)
 {
-    printf("RESULT: TRI INTERSECTION: %d failures\n", 
test_tri_intersections());
-    printf("RESULT: SINGL FACE SPLIT: %d failures\n", 
test_face_split_single());
-    printf("RESULT: FACE SPLITTING  : %d failures\n", test_face_splits());
+#define TRY(STR,FNC) { int rval = FNC(); printf("RESULT:%18s: 
\033[1;%dm%d\033[m failures\n", STR, rval==0?32:31, rval); }
+    TRY("TRI INTERSECTION", test_tri_intersections);
+    TRY("SINGLE FACE SPLIT", test_face_split_single);
+    TRY("FACE SPLITTING", test_face_splits);
+#undef TRY
     return 0;
 }
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to