You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

StringFold.java 629B

12345678910111213141516
  1. import org.aspectj.testing.Tester;
  2. public class StringFold {
  3. static public void main(String[] args) {
  4. Tester.checkEq("th" + "ere", "the" + "re", "\"th\" + \"ere\" == \"the\" + \"re\"");
  5. Tester.checkEq(StringFoldHelper.xx, "th", "StringFoldHelper.xx == \"th\"");
  6. Tester.checkEq(StringFoldHelper.xx + "ere", "there", "StringFoldHelper.xx + \"ere\" == \"there\"");
  7. Tester.checkEq(StringFoldHelper.xx + "", StringFoldHelper.xx, "StringFoldHelper.xx + \"\" == StringFoldHelper.xx");
  8. Tester.checkEq("\477", "'7", "2-digit octal escape");
  9. }
  10. }
  11. class StringFoldHelper {
  12. static public final String xx = "th";
  13. }