diff --git a/src/org/rascalmpl/library/lang/rascal/tests/basic/Strings1.rsc b/src/org/rascalmpl/library/lang/rascal/tests/basic/Strings1.rsc index c50e0bd14b1..96485906099 100644 --- a/src/org/rascalmpl/library/lang/rascal/tests/basic/Strings1.rsc +++ b/src/org/rascalmpl/library/lang/rascal/tests/basic/Strings1.rsc @@ -265,21 +265,21 @@ test bool tstSqueezeCase4() = squeeze("aabbcc", "a-c") == "abc"; test bool tstSqueezeCase5() = squeeze("aaabc", "a-c") == "abc"; // second squeeze -test bool tstSqueeze1(str S) = // !:= squeeze(S, #[a-zA-Z]); -test bool tstSqueeze2(str S) = squeeze(S, #[]) == S; -test bool tstSqueeze3(str S) { +test bool tstSqueeze1CC(str S) = // !:= squeeze(S, #[a-zA-Z]); +test bool tstSqueeze2CC(str S) = squeeze(S, #[]) == S; +test bool tstSqueeze3CC(str S) { if (// := S) { return // := squeeze(S, #[0-9]); } return true; } -test bool tstSqueezeUnicode() = squeeze("Hi ๐Ÿ๐ŸWorld", #[๐Ÿ]) == "Hi ๐ŸWorld"; -test bool tstSqueezeCase1() = squeeze("abc", #[a-c]) == "abc"; -test bool tstSqueezeCase2() = squeeze("aabc", #[a-c]) == "abc"; -test bool tstSqueezeCase3() = squeeze("aabcc", #[a-c]) == "abc"; -test bool tstSqueezeCase4() = squeeze("aabbcc", #[a-c]) == "abc"; -test bool tstSqueezeCase5() = squeeze("aaabc", #[a-c]) == "abc"; +test bool tstSqueezeUnicodeCC() = squeeze("Hi ๐Ÿ๐ŸWorld", #[๐Ÿ]) == "Hi ๐ŸWorld"; +test bool tstSqueezeCase1CC() = squeeze("abc", #[a-c]) == "abc"; +test bool tstSqueezeCase2CC() = squeeze("aabc", #[a-c]) == "abc"; +test bool tstSqueezeCase3CC() = squeeze("aabcc", #[a-c]) == "abc"; +test bool tstSqueezeCase4CC() = squeeze("aabbcc", #[a-c]) == "abc"; +test bool tstSqueezeCase5CC() = squeeze("aaabc", #[a-c]) == "abc"; test bool tstStartsWith(str S1, str S2) = startsWith(S1+S2, S1); diff --git a/src/org/rascalmpl/values/parsetrees/SymbolFactory.java b/src/org/rascalmpl/values/parsetrees/SymbolFactory.java index 666064ea692..ee6faf40483 100644 --- a/src/org/rascalmpl/values/parsetrees/SymbolFactory.java +++ b/src/org/rascalmpl/values/parsetrees/SymbolFactory.java @@ -348,7 +348,7 @@ private static IValue char2int(Char character) { return factory.integer(Integer.parseUnsignedInt(s.substring(2), 16)); } else { - char cha = s.charAt(1); + int cha = s.codePointAt(1); switch (cha) { case 't': return factory.integer('\t'); case 'n': return factory.integer('\n'); @@ -365,7 +365,7 @@ private static IValue char2int(Char character) { } } else { - char cha = s.charAt(0); + int cha = s.codePointAt(0); return factory.integer(cha); } }