User: kimptoc
Date: 01/09/07 03:26:43
Modified: src/main/org/jboss/test/jbossmq/test TestSelectorParser.java
Log:
fixed deprecation warnings
Revision Changes Path
1.2 +12 -12
jbosstest/src/main/org/jboss/test/jbossmq/test/TestSelectorParser.java
Index: TestSelectorParser.java
===================================================================
RCS file:
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/jbossmq/test/TestSelectorParser.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TestSelectorParser.java 2001/08/24 17:28:58 1.1
+++ TestSelectorParser.java 2001/09/07 10:26:43 1.2
@@ -13,7 +13,7 @@
/** Tests of the JavaCC LL(1) parser.
@author [EMAIL PROTECTED]
- @version $Revision: 1.1 $
+ @version $Revision: 1.2 $
*/
public class TestSelectorParser extends TestCase
{
@@ -39,20 +39,20 @@
// String
Object result = parser.parse("'A String'", identifierMap);
System.out.println("parse('A String') -> "+result);
- assert("String is 'A String'", result.equals("'A String'"));
+ assertTrue("String is 'A String'", result.equals("'A String'"));
// An identifier
result = parser.parse("a_variable$", identifierMap);
System.out.println("parse(a_variable$) -> "+result);
Identifier id = new Identifier("a_variable$");
- assert("String is a_variable$", result.equals(id));
+ assertTrue("String is a_variable$", result.equals(id));
// Long
result = parser.parse("12345", identifierMap);
System.out.println("parse(12345) -> "+result);
- assert("Long is 12345", result.equals(new Long(12345)));
+ assertTrue("Long is 12345", result.equals(new Long(12345)));
// Double
result = parser.parse("12345.67", identifierMap);
System.out.println("parse(12345.67) -> "+result);
- assert("Double is 12345.67", result.equals(new Double(12345.67)));
+ assertTrue("Double is 12345.67", result.equals(new Double(12345.67)));
}
public void testSimpleUnary() throws Exception
@@ -62,13 +62,13 @@
Operator result = (Operator) parser.parse("-12345 = -1 * 12345",
identifierMap);
System.out.println("result -> "+result);
Boolean b = (Boolean) result.apply();
- assert("is true", b.booleanValue());
+ assertTrue("is true", b.booleanValue());
// Neg Double
System.out.println("parse(-1 * 12345.67 = -12345.67)");
result = (Operator) parser.parse("-1 * 12345.67 = -12345.67", identifierMap);
System.out.println("result -> "+result);
b = (Boolean) result.apply();
- assert("is true", b.booleanValue());
+ assertTrue("is true", b.booleanValue());
}
public void testPrecedenceNAssoc() throws Exception
@@ -77,25 +77,25 @@
Operator result = (Operator) parser.parse("4 + 2 * 3 / 2 = 7)",
identifierMap);
System.out.println("result -> "+result);
Boolean b = (Boolean) result.apply();
- assert("is true", b.booleanValue());
+ assertTrue("is true", b.booleanValue());
System.out.println("parse(4 + ((2 * 3) / 2) = 7)");
result = (Operator) parser.parse("4 + ((2 * 3) / 2) = 7)", identifierMap);
System.out.println("result -> "+result);
b = (Boolean) result.apply();
- assert("is true", b.booleanValue());
+ assertTrue("is true", b.booleanValue());
System.out.println("parse(4 * -2 / -1 - 4 = 4)");
result = (Operator) parser.parse("4 * -2 / -1 - 4 = 4)", identifierMap);
System.out.println("result -> "+result);
b = (Boolean) result.apply();
- assert("is true", b.booleanValue());
+ assertTrue("is true", b.booleanValue());
System.out.println("parse(4 * ((-2 / -1) - 4) = -8)");
result = (Operator) parser.parse("4 * ((-2 / -1) - 4) = -8)", identifierMap);
System.out.println("result -> "+result);
b = (Boolean) result.apply();
- assert("is true", b.booleanValue());
+ assertTrue("is true", b.booleanValue());
}
public void testIds() throws Exception
@@ -115,7 +115,7 @@
e.setValue(new Long(7));
System.out.println("result -> "+result);
Boolean bool = (Boolean) result.apply();
- assert("is true", bool.booleanValue());
+ assertTrue("is true", bool.booleanValue());
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development