Lines Matching defs:result

164     private static void check(Matcher m, String result, boolean expected) {
166 if (m.group().equals(result) != expected)
469 List<String> result = new ArrayList<String>();
473 result.add(m.group());
475 if (!Arrays.asList(expected).equals(result))
599 String result[] = s.split("[^fr]");
600 if (!result[0].equals("f"))
602 if (!result[1].equals("r"))
605 result = s.split("[^fr]");
606 if (!result[0].equals("f"))
608 if (!result[1].equals("r"))
790 String result = matcher.replaceAll(replaceTest);
791 if (!result.equals("zzzabczzz"))
796 result = matcher.replaceAll(literalReplacement);
797 if (!result.equals("zzz$0zzz"))
803 result = matcher.replaceAll(literalReplacement);
804 if (!result.equals("zzz\\t$\\$zzz"))
811 result = matcher.replaceAll(replaceTest);
812 if (!result.equals(toSupplementaries("zzzabczzz")))
817 result = matcher.replaceAll(literalReplacement);
818 if (!result.equals(toSupplementaries("zzz$0zzz")))
824 result = matcher.replaceAll(literalReplacement);
825 if (!result.equals(toSupplementaries("zzz\\t$\\$zzz")))
930 // Correct result
932 // Correct result
1320 String result = matcher.replaceFirst("$1");
1321 if (!result.equals("zzzabzzzabcczzzabccczzz"))
1325 result = matcher.replaceFirst("$2");
1326 if (!result.equals("zzzccczzzabcczzzabccczzz"))
1352 result = matcher.replaceFirst("$1");
1353 if (!result.equals(toSupplementaries("zzzabzzzabcczzzabccczzz")))
1357 result = matcher.replaceFirst("$2");
1358 if (!result.equals(toSupplementaries("zzzccczzzabcczzzabccczzz")))
1593 String result = matcher.replaceAll("$2$1");
1594 if (!result.equals("cdab"))
1603 result = matcher.replaceAll(r);
1604 if (!result.equals("Swap all: 123 = first, 456 = second"))
1613 result = sb.toString();
1614 if (!result.equals("Swap one: 123 = first, second = 456"))
1621 result = matcher.replaceAll("$2$1");
1622 if (!result.equals(toSupplementaries("cdab")))
1631 result = matcher.replaceAll(r);
1632 if (!result.equals(toSupplementaries("Swap all: 123 = first, 456 = second")))
1641 result = sb.toString();
1642 if (!result.equals(toSupplementaries("Swap one: 123 = first, second = 456")))
1650 String[] result = pattern.split("foo:and:boo", 2);
1651 if (!result[0].equals("foo"))
1653 if (!result[1].equals("and:boo"))
1657 result = patternX.split(toSupplementaries("fooXandXboo"), 2);
1658 if (!result[0].equals(toSupplementaries("foo")))
1660 if (!result[1].equals(toSupplementaries("andXboo")))
1666 result = pattern.split(cb);
1667 if (!result[0].equals("foo"))
1669 if (!result[1].equals("and"))
1671 if (!result[2].equals("boo"))
1678 result = patternX.split(cbs);
1679 if (!result[0].equals(toSupplementaries("foo")))
1681 if (!result[1].equals(toSupplementaries("and")))
1683 if (!result[2].equals(toSupplementaries("boo")))
1689 result = source.split(Integer.toString(x), limit);
1694 if (result.length != 1)
1696 if (!result[0].equals("012345678")) {
1700 if (result.length != expectedLength) {
1703 if (!result[0].equals(source.substring(0,x))) {
1707 if (!result[0].equals(source.substring(0,10))) {
1713 if (!result[1].equals(source.substring(x+1,10)))
1721 result = source.split("e", limit);
1722 if (result.length != 1)
1724 if (!result[0].equals(source))
1729 result = source.split("e", 0);
1730 if (result.length != 1)
1732 if (!result[0].equals(source))
1927 boolean result = m.find(2);
1928 if (!result)
1933 result = m.find(10);
1934 if (!result)
1937 result = m.find(11);
1940 // correct result
1946 result = m.find(2);
1947 if (!result)
1958 boolean result = m.find();
1959 if (result != true)
1966 result = m.matches();
1967 if (result == true)
1974 // Correct result
1979 result = m.matches();
1980 if (result != true)
1983 result = Pattern.matches("", "");
1984 if (result != true)
1987 result = Pattern.matches("", "foo");
1988 if (result == true)
2089 String result = matcher.replaceAll("X");
2090 if (!result.equals("Xthis is some text"))
2095 result = matcher.replaceAll("X");
2096 if (!result.equals("Xthis is some text"))
2101 result = matcher.replaceAll("X");
2102 if (!result.equals("Xthis is some text\n"))
2117 // Good result
2127 // Good result
2139 // Good result
2149 // Good result
2554 String result = m.replaceAll("$1");
2555 if (!result.equals("zzzabzzzabzzzabzzz"))
2573 result = m.replaceAll("$1");
2574 if (!result.equals(toSupplementaries("zzzabzzzabzzzabzzz")))
2589 StringBuffer result = new StringBuffer();
2591 m.appendReplacement(result, "blech");
2596 m.appendReplacement(result, "blech");
2597 if (!result.toString().equals("zzzblech"))
2600 m.appendTail(result);
2601 if (!result.toString().equals("zzzblechzzz"))
2608 result = new StringBuffer();
2610 m.appendReplacement(result, "$1");
2615 m.appendReplacement(result, "$1");
2616 if (!result.toString().equals("zzzab"))
2619 m.appendTail(result);
2620 if (!result.toString().equals("zzzabzzz"))
2627 result = new StringBuffer();
2629 m.appendReplacement(result, "$1w$2w$3");
2634 m.appendReplacement(result, "$1w$2w$3");
2635 if (!result.toString().equals("zzzabwcdwef"))
2638 m.appendTail(result);
2639 if (!result.toString().equals("zzzabwcdwefzzz"))
2647 result = new StringBuffer();
2649 m.appendReplacement(result, "$1");
2654 m.appendReplacement(result, "$1");
2655 if (!result.toString().equals("zzzab"))
2660 m.appendReplacement(result, "$2");
2661 if (!result.toString().equals("zzzabzzzabcddzzzcd"))
2664 m.appendTail(result);
2665 if (!result.toString().equals("zzzabzzzabcddzzzcdzzz"))
2672 result = new StringBuffer();
2674 m.appendReplacement(result, "$1w\\$2w$3");
2675 if (!result.toString().equals("zzzabw$2wef"))
2678 m.appendTail(result);
2679 if (!result.toString().equals("zzzabw$2wefzzz"))
2686 result = new StringBuffer();
2689 m.appendReplacement(result, "$1w$5w$3");
2692 // Correct result
2699 result = new StringBuffer();
2701 m.appendReplacement(result, "$1w$11w$3");
2702 if (!result.toString().equals("zzz1w11w3"))
2709 result = new StringBuffer();
2711 m.appendReplacement(result, "$1w$15w$3");
2712 if (!result.toString().equals("zzzabwab5wef"))
2721 result = new StringBuffer();
2723 m.appendReplacement(result, toSupplementaries("blech"));
2728 m.appendReplacement(result, toSupplementaries("blech"));
2729 if (!result.toString().equals(toSupplementaries("zzzblech")))
2732 m.appendTail(result);
2733 if (!result.toString().equals(toSupplementaries("zzzblechzzz")))
2740 result = new StringBuffer();
2742 m.appendReplacement(result, "$1");
2747 m.appendReplacement(result, "$1");
2748 if (!result.toString().equals(toSupplementaries("zzzab")))
2751 m.appendTail(result);
2752 if (!result.toString().equals(toSupplementaries("zzzabzzz")))
2759 result = new StringBuffer();
2761 m.appendReplacement(result, toSupplementaries("$1w$2w$3"));
2766 m.appendReplacement(result, toSupplementaries("$1w$2w$3"));
2767 if (!result.toString().equals(toSupplementaries("zzzabwcdwef")))
2770 m.appendTail(result);
2771 if (!result.toString().equals(toSupplementaries("zzzabwcdwefzzz")))
2779 result = new StringBuffer();
2781 m.appendReplacement(result, "$1");
2786 m.appendReplacement(result, "$1");
2787 if (!result.toString().equals(toSupplementaries("zzzab")))
2792 m.appendReplacement(result, "$2");
2793 if (!result.toString().equals(toSupplementaries("zzzabzzzabcddzzzcd")))
2796 m.appendTail(result);
2797 if (!result.toString().equals(toSupplementaries("zzzabzzzabcddzzzcdzzz")))
2804 result = new StringBuffer();
2806 m.appendReplacement(result, toSupplementaries("$1w\\$2w$3"));
2807 if (!result.toString().equals(toSupplementaries("zzzabw$2wef")))
2810 m.appendTail(result);
2811 if (!result.toString().equals(toSupplementaries("zzzabw$2wefzzz")))
2818 result = new StringBuffer();
2821 m.appendReplacement(result, toSupplementaries("$1w$5w$3"));
2824 // Correct result
2831 result = new StringBuffer();
2833 m.appendReplacement(result, toSupplementaries("$1w$11w$3"));
2834 if (!result.toString().equals(toSupplementaries("zzz1w11w3")))
2841 result = new StringBuffer();
2843 m.appendReplacement(result, toSupplementaries("$1w$15w$3"));
2844 if (!result.toString().equals(toSupplementaries("zzzabwab5wef")))
2851 result = new StringBuffer();
2854 m.appendReplacement(result, ("xyz$g"));
2857 if (result.length() != 0)
2931 String result = m.replaceAll(replacement);
2933 // Construct expected result
2943 if (!result.equals(expectedResult))
3203 StringBuffer result = new StringBuffer();
3216 result.append("true ");
3217 result.append(m.group(0) + " ");
3219 result.append("false ");
3222 result.append(m.groupCount());
3227 result.append(" " +m.group(i));
3230 // Read a line for the expected result
3233 if (!result.toString().equals(expectedResult)) {
3234 explainFailure(patternString, dataString, expectedResult, result.toString());