diff -r a0b47629aad8 -r 3bc4c54f4bcc samples/apifest1/day2/RealTest.java --- a/samples/apifest1/day2/RealTest.java Sat Jun 14 09:52:47 2008 +0200 +++ b/samples/apifest1/day2/RealTest.java Sat Jun 14 09:56:12 2008 +0200 @@ -1,37 +1,12 @@ -/* - * The contents of this file are subject to the terms of the Common Development - * and Distribution License (the License). You may not use this file except in - * compliance with the License. - * - * You can obtain a copy of the License at http://www.netbeans.org/cddl.html - * or http://www.netbeans.org/cddl.txt. - * - * When distributing Covered Code, include this CDDL Header Notice in each file - * and include the License file at http://www.netbeans.org/cddl.txt. - * If applicable, add the following below the CDDL Header, with the fields - * enclosed by brackets [] replaced by your own identifying information: - * "Portions Copyrighted [year] [name of copyright owner]" - * - * The Original Software is NetBeans. The Initial Developer of the Original - * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun - * Microsystems, Inc. All Rights Reserved. - */ - package org.netbeans.apifest.boolcircuit; -import java.security.CodeSource; -import java.security.Permission; -import java.security.PermissionCollection; -import java.security.Policy; -import java.util.Collection; -import java.util.Collections; -import java.util.Enumeration; import junit.framework.TestCase; import junit.framework.*; // BEGIN: apitest.day2.RealTest /** This file contains the APIFest quest for day 2. Simply, turn the - * boolean circuit into circuit that can compute with double values from 0 to 1. + * boolean circuit into circuit that can compute with double + * values from 0 to 1. *

* This means that where ever a boolean was used to represent input or * output values, one can now use any double number from >= 0 and <= 1. @@ -39,21 +14,23 @@ * has to be kept available and have to work. In fact False shall be * treated as 0 and True as 1. *

- * The basic elements has to be modified to work on doubles in the following - * way: + * The basic elements has to be modified to work on doubles + * in the following way: *

*

- * However as the circuits with doubles are more rich than plain boolean circuits, - * there is additional requirement to allow any user of your API to write its - * own "element" type. This is all going to be exercise in the tests bellow - * which you are supposed to implement. + * However as the circuits with doubles are more rich than plain boolean + * circuits, there is additional requirement to allow any user of your API + * to write its own "element" type. This is all going to be exercise in + * the tests bellow which you are supposed to implement. */ public class RealTest extends TestCase { static { @@ -77,7 +54,8 @@ * * Feed the same circuit with x1=0.5, x2=0.5, assert result is 0.625 * - * Feed the same circuit with x1=0.0, x2=2.0, make sure it throws an exception + * Feed the same circuit with x1=0.0, x2=2.0, make sure it + * throws an exception */ public void testX1andX2orNotX1() { fail("testX1andX2orNotX1"); @@ -94,7 +72,8 @@ fail("testImproperUseOfTheCircuit"); } - /** Write your own element type called "gte" that will have two inputs and one output. + /** Write your own element type called "gte" that will have two + * inputs and one output. * The output value will be 1 if x1 >= x2 and 0 otherwise. * * Create