suvi
Class GraphLayoutAlgGenTest

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--suvi.GraphLayoutAlgGenTest
All Implemented Interfaces:
FlowTrendConstants, GraphLayoutAlgGenConstants, junit.framework.Test

public class GraphLayoutAlgGenTest
extends junit.framework.TestCase
implements FlowTrendConstants, GraphLayoutAlgGenConstants

A [JUnit] test for GraphLayoutAlgGen.


Field Summary
 
Fields inherited from interface suvi.api.alg.attr.FlowTrendConstants
FT_BIT_MASK, FT_CANONICAL, FT_DOWN_LEFT, FT_DOWN_RIGHT, FT_INVERT_ORDERING_FLAG, FT_INVERT_RANKING_FLAG, FT_LEFT_DOWN, FT_LEFT_UP, FT_RIGHT_DOWN, FT_RIGHT_UP, FT_ROTATE_FLAG, FT_UP_LEFT, FT_UP_RIGHT
 
Fields inherited from interface suvi.GraphLayoutAlgGenConstants
LAO_BIT_MASK, LAO_WITH_DEBUG_ASSERTIONS_FLAG, LAO_WITH_EDGE_LABELS_FLAG, LAO_WITH_EXPLICIT_RANK_ORDER_FLAG, LAO_WITH_NODE_RANK_GROUPING_FLAG, LAO_WITH_PARTIAL_RANK_ORDER_FLAG, LAQ_BEST_VISUAL_QUALITY, LAQ_FASTEST_LAYOUT_ALG, LAQ_GOOD_VISUAL_QUALITY_AND_FAST_LAYOUT_ALG, LAQ_MAX_VALUE, LAQ_MIN_VALUE
 
Constructor Summary
GraphLayoutAlgGenTest()
           
 
Method Summary
 void testGen()
          Tests all algorithms generated by the GraphLayoutAlgGen-class by using them on a random graph.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GraphLayoutAlgGenTest

public GraphLayoutAlgGenTest()
Method Detail

testGen

public void testGen()

Tests all algorithms generated by the GraphLayoutAlgGen-class by using them on a random graph.

This randomized test has proven to be very effective by catching several bugs. The reason for the effectiviness is the randomness. It can be very difficult and time consuming to prove that all necessary cases have been tested. While this test doesn't prove the absense of bugs, it should be possible to formally prove that by running this test many times, the probability that some essential test case has not been tested, has been reduced considerably.