package Examples; import org.junit.* ; import Common.Common; import Sequenic.T3.T3Cmd; import Sequenic.T3.Generator.*; import Sequenic.T3.Sequence.Datatype.*; import static Sequenic.T3.Generator.Value.ValueMGCombinators.* ; public class T3TestTriangle { static public Generator myvalgen = Double(OneOf(0,0.1,0.1,0.1,2)) ; public static void generate(String CUT, boolean withCustomgen, boolean injectOracle) throws Exception { String cvgOption = "" ; String oracleOption = "" ; if (withCustomgen) cvgOption = " -cvg Examples.T3TestTriangle " ; if (!injectOracle) oracleOption =" -norc " ; T3Cmd.main("-reg -core 2 -pl 1 -vp -sl 3 -ms 10 -rv 2 -fup 0 " // + cvgOption + oracleOption + " -sd " + Common.getCUTrootBindir() + " -d " + Common.getTrDir() + " " + CUT); } static String CUT = "Examples.Triangle" ; @Test public void testPlainWithOracles() throws Throwable { generate(CUT,false,true) ; } @Test public void testWithCustomGenWithOracles() throws Throwable { generate(CUT,true,true) ; } // without injected oracles: //@Test public void testPlain() throws Throwable { generate(CUT,false,false) ; } // without injected oracles: //@Test public void testWithCustomGen() throws Throwable { generate(CUT,true,false) ; } }