samples/apifest1/day2/RealTest.java
changeset 133 50bf1b976c0d
parent 132 3bc4c54f4bcc
child 153 b5cbb797ec0a
     1.1 --- a/samples/apifest1/day2/RealTest.java	Sat Jun 14 09:56:12 2008 +0200
     1.2 +++ b/samples/apifest1/day2/RealTest.java	Sat Jun 14 09:56:16 2008 +0200
     1.3 @@ -24,7 +24,7 @@
     1.4   *             and(false,true)=0*1=0=false
     1.5   *   <li>or - or(x,y) = 1 - (1 - x) * (1 - y) and this is also ok as
     1.6   *            or(false,false) = 1 - (1 - 0) * (1 - 0) = 1 - 1 = 0 = false
     1.7 - *            or(true,false) = 1 - (1 - 1) * (1 - 0) = 1 - 0 * 1 = 1 = true
     1.8 + *            or(true,false) = 1 - (1 - 1)*(1 - 0) = 1 - 0 * 1 = 1 = true
     1.9   * </ul>
    1.10   * <p>
    1.11   * However as the circuits with doubles are more rich than plain boolean 
    1.12 @@ -48,7 +48,8 @@
    1.13       *
    1.14       * Feed this circuit with x1=true, x2=false, assert result is false
    1.15       *
    1.16 -     * Feed the same circuit with x1=false, x2=true, assert result is true
    1.17 +     * Feed the same circuit with x1=false, x2=true, assert result is 
    1.18 +     * true
    1.19       *
    1.20       * Feed the same circuit with x1=0.0, x2=1.0, assert result is 1.0
    1.21       *
    1.22 @@ -61,12 +62,12 @@
    1.23          fail("testX1andX2orNotX1");
    1.24      }
    1.25      
    1.26 -    /** Ensure that one variable cannot be filled with two different values.
    1.27 -     * Create a circuit for x1 and x1. Make sure that for any usage of your
    1.28 -     * API that would not lead to x1 * x1 result, an exception is thrown.
    1.29 -     * For example if there was a way to feed the circuit with two different 
    1.30 -     * values 0.3 and 0.5 an exception is thrown indicating that this is 
    1.31 -     * improper use of the circuit.
    1.32 +    /** Ensure that one variable cannot be filled with two different 
    1.33 +     * values. Create a circuit for x1 and x1. Make sure that for any 
    1.34 +     * usage of your API that would not lead to x1 * x1 result, an 
    1.35 +     * exception is thrown. For example if there was a way to feed the 
    1.36 +     * circuit with two different values 0.3 and 0.5 an exception is 
    1.37 +     * thrown indicating that this is improper use of the circuit.
    1.38       */
    1.39      public void testImproperUseOfTheCircuit() {
    1.40          fail("testImproperUseOfTheCircuit");