Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update tests to use `` for string interpolation

  • Loading branch information...
commit c0da41451c0afe05722b582248e7580e1d4191d4 1 parent 471f558
@gavinking gavinking authored
View
2  test/main/function/Lambdas.ceylon
@@ -79,7 +79,7 @@ class Lambdas() {
@type:"String" lazy("hello")();
function name(String first)(String middle)(String last) {
- return "' first ' ' middle ' ' last '";
+ return "``first`` ``middle`` ``last``";
}
String n1(String middle)(String last) => name("Gavin")(middle)(last);
String n2(String last) => name("Gavin")("A")(last);
View
6 test/main/typing/BrokenSelfTypes.ceylon
@@ -21,15 +21,15 @@ class BinaryOperator(Tree|Integer left, Tree|Integer right, Integer f(Integer a,
return f(resolve(left), resolve(right));
}
- shared actual default String string = "Binary('left', 'right')";
+ shared actual default String string = "Binary(``left``, ``right``)";
}
class Multiplication(Tree|Integer left, Tree|Integer right)
extends BinaryOperator(left, right, (Integer a, Integer b) => a * b) {
- shared actual default String string = "('left' * 'right')";
+ shared actual default String string = "(``left`` * ``right``)";
}
class Addition(Tree|Integer left, Tree|Integer right)
extends BinaryOperator(left, right, (Integer a, Integer b) => a + b) {
- shared actual default String string = "('left' + 'right')";
+ shared actual default String string = "(``left`` + ``right``)";
}
View
4 test/main/typing/Literals.ceylon
@@ -20,7 +20,7 @@ class Literals() {
value ss2 = [ "hello", "world" ];
@type:"Tuple<Integer,Integer,Tuple<Integer,Integer,Tuple<Integer,Integer,Tuple<Integer,Integer,Empty>>>>"
value ns2 = [ 1, 2, 3, 4 ];
- @type:"String" value st = "pi = '3.1415' approx";
+ @type:"String" value st = "pi = ``3.1415`` approx";
@type:"String" value q = "hibernate.org";
Boolean b = true;
@@ -41,7 +41,7 @@ class Literals() {
@type:"Integer" value nnn = 2.minus(1);
@type:"Float" value fff = 2.0.times(-3.0);
- @type:"String" @error value st2 = "( 'null' )";
+ @type:"String" @error value st2 = "( ``null`` )";
@type:"Integer" value hex1 = #FF12;
@type:"Integer" value hex2 = #FF12_A0E9;
View
20 test/main/typing/Primaries.ceylon
@@ -179,19 +179,19 @@ class Primaries() {
ann {Float} shared {Float*} floats = {};
- String interpolated0 = "hello' "ABC123".count(function (Character c) => c.digit) 'world";
- String interpolated1 = "hello' { "ABC' 1+1 '123" } 'world";
- String interpolated2 = "hello' Singleton("ABC' 1+1 '123") 'world";
- String interpolated3 = "hello' Singleton { element="ABC' 1+1 '123"; } 'world";
- String interpolated4 = "hello' ("ABC' 1+1 '123") 'world";
- String interpolated5 = "hello' ["ABC' 1+1 '123"] 'world";
- String interpolated6 = "hello' -10 'world";
- String interpolated7 = "hello' +10 'world";
- String interpolated8 = "hello' "ABC123".size 'world";
+ String interpolated0 = "hello`` "ABC123".count(function (Character c) => c.digit) ``world";
+ String interpolated1 = "hello`` { "ABC`` 1+1 ``123" } ``world";
+ String interpolated2 = "hello`` Singleton("ABC`` 1+1 ``123") ``world";
+ String interpolated3 = "hello`` Singleton { element="ABC`` 1+1 ``123"; } ``world";
+ String interpolated4 = "hello`` ("ABC`` 1+1 ``123") ``world";
+ String interpolated5 = "hello`` ["ABC`` 1+1 ``123"] ``world";
+ String interpolated6 = "hello`` -10 ``world";
+ String interpolated7 = "hello`` +10 ``world";
+ String interpolated8 = "hello`` "ABC123".size ``world";
List<Character> list=[' '];
@type:"Sequential<Integer>" value xxxx = list*.integer;
- Exception("Expecting an Array but got: ' true then "x" else "null" '");
+ Exception("Expecting an Array but got: `` true then "x" else "null" ``");
}
Please sign in to comment.
Something went wrong with that request. Please try again.