public void testConstants() {
    System.out.println();
    String[] constantsToTest = 
      {"True", "False", "and", "or", "xor", "not", "equiv", "implies", "forAll", 
       "thereExists", "thereExistExactly", "thereExistAtMost", "thereExistAtLeast", 
       "Dog", "Cat", "Collection", "foo:bar", "#$foo:bar",
       "#$True", "#$False", "#$and", "#$or", "#$xor", "#$not", "#$equiv", 
       "#$implies", "#$forAll", "#$thereExists", "#$thereExistExactly", 
       "#$thereExistAtMost", "#$thereExistAtLeast", 
       "#$Dog", "#$Cat", "#$Collection", "#$1-TheDigit","#Gbd5880d9-9c29-11b1-9dad-c379636f7270", 
       "#GBD5880D9-9C29-11B1-9dad-c379636F7270", "#G\"bd5880d9-9c29-11b1-9dad-c379636f7270\"",
       "#G\"BD5880d9-9c29-11b1-9dad-c379636F7270\"","#gbd5880d9-9c29-11b1-9dad-c379636f7270", 
       "#gBD5880D9-9C29-11B1-9dad-c379636F7270", "#g\"bd5880d9-9c29-11b1-9dad-c379636f7270\"",
       "#g\"BD5880d9-9c29-11b1-9dad-c379636F7270\"", "qawerpiouasdf", "#$234a2354dsf", "#$234-"};
    String[] constantsThatShouldFail = { "", "ExpandSubLFn", "SubLQuoteFn", 
      "#$ExpandSubLFn", "#$SubLQuoteFn", "#$-", "#$?", "#$?234", "#$234?", 
      "#$1", "#$.", "#$@", "#$!", "#GXbd5880d9-9c29-11b1-9dad-c379636f7270"};
    java.io.Reader reader = null;
    try {
      for (int j = 0; j < 2; j++) {
        if (j==0) {
          System.out.println("!!!!!!!!!!!!!!!!! These tests should succeed. !!!!!!!!!!!!!!!!!");
        } else {
          System.out.println("!!!!!!!!!!!!!!!!! These tests should fail. !!!!!!!!!!!!!!!!!");
          constantsToTest = constantsThatShouldFail;
        }
        for (int i = 0; i < constantsToTest.length; i++) {
          try {
            String curTest = constantsToTest[i];
            System.out.println("Input: '" + curTest + "'.");
            reader = new java.io.StringReader(curTest);
            parser.ReInit(reader);
            Object result = parser.constant(true);
            if (result == null) {
              System.out.println("Output: " + result);
            } else {
              System.out.println("Output: " + DefaultCycObject.cyclify(result) + 
                " of type: " + result.getClass() + ".");
            }
            if (j == 0) {
              Assert.assertNotNull(result);
              Assert.assertTrue(result instanceof CycConstant);
            } else {
              Assert.fail(null);
            }
          } catch (AssertionFailedError afe) {
            afe.printStackTrace(System.out);
            throw afe;
          } catch (Throwable e) {
            if (j == 0) {
              e.printStackTrace(System.out);
              Assert.assertNotNull(null);
            } else {
              System.out.println("Output: ");
              e.printStackTrace(System.out);
            }
          } finally {
            System.out.println();
          }
        }
      }
      
    } catch (Exception e) {
      e.printStackTrace();
    }
  }