@@ -129,7 +129,8 @@ public void testDateFormat() {
129
129
@ Test
130
130
public void testPlural () {
131
131
String message = ""
132
- + ".match {$count :number}\n "
132
+ + ".input {$count :number}\n "
133
+ + ".match $count\n "
133
134
+ " 1 {{You have one notification.}}\n "
134
135
+ " * {{You have {$count} notifications.}}" ;
135
136
@@ -147,7 +148,8 @@ public void testPlural() {
147
148
@ Test
148
149
public void testPluralOrdinal () {
149
150
String message = ""
150
- + ".match {$place :number select=ordinal}\n "
151
+ + ".input {$place :number select=ordinal}\n "
152
+ + ".match $place\n "
151
153
+ " 1 {{You got the gold medal}}\n "
152
154
+ " 2 {{You got the silver medal}}\n "
153
155
+ " 3 {{You got the bronze medal}}\n "
@@ -332,7 +334,8 @@ public void testFormatterIsCreatedOnce() {
332
334
@ Test
333
335
public void testPluralWithOffset () {
334
336
String message = ""
335
- + ".match {$count :number icu:offset=2}\n "
337
+ + ".input {$count :number icu:offset=2}\n "
338
+ + ".match $count\n "
336
339
+ " 1 {{Anna}}\n "
337
340
+ " 2 {{Anna and Bob}}\n "
338
341
+ " one {{Anna, Bob, and {$count :number icu:offset=2} other guest}}\n "
@@ -361,7 +364,7 @@ public void testPluralWithOffset() {
361
364
public void testPluralWithOffsetAndLocalVar () {
362
365
String message = ""
363
366
+ ".local $foo = {$count :number icu:offset=2}"
364
- + ".match { $foo :number} \n " // should "inherit" the offset
367
+ + ".match $foo\n " // should "inherit" the offset
365
368
+ " 1 {{Anna}}\n "
366
369
+ " 2 {{Anna and Bob}}\n "
367
370
+ " one {{Anna, Bob, and {$foo} other guest}}\n "
@@ -390,7 +393,7 @@ public void testPluralWithOffsetAndLocalVar() {
390
393
public void testPluralWithOffsetAndLocalVar2 () {
391
394
String message = ""
392
395
+ ".local $foo = {$amount :number icu:skeleton=|.00/w|}\n "
393
- + ".match { $foo :number} \n " // should "inherit" the offset
396
+ + ".match $foo\n " // should "inherit" the offset
394
397
+ " 1 {{Last dollar}}\n "
395
398
+ " one {{{$foo} dollar}}\n "
396
399
+ " * {{{$foo} dollars}}" ;
@@ -412,7 +415,7 @@ public void testPluralWithOffsetAndLocalVar2() {
412
415
public void testPluralWithOffsetAndLocalVar2Options () {
413
416
String message = ""
414
417
+ ".local $foo = {$amount :number minumumFractionalDigits=2}\n "
415
- + ".match { $foo :number} \n " // should "inherit" the offset
418
+ + ".match $foo\n " // should "inherit" the offset
416
419
+ " 1 {{Last dollar}}\n "
417
420
+ " one {{{$foo} dollar}}\n "
418
421
+ " * {{{$foo} dollars}}" ;
@@ -447,7 +450,8 @@ public void testLoopOnLocalVars() {
447
450
@ Test
448
451
public void testVariableOptionsInSelector () {
449
452
String messageVar = ""
450
- + ".match {$count :number icu:offset=$delta}\n "
453
+ + ".input {$count :number icu:offset=$delta}\n "
454
+ + ".match $count\n "
451
455
+ " 1 {{A}}\n "
452
456
+ " 2 {{A and B}}\n "
453
457
+ " one {{A, B, and {$count :number icu:offset=$delta} more character}}\n "
@@ -465,7 +469,8 @@ public void testVariableOptionsInSelector() {
465
469
mfVar .formatToString (Args .of ("count" , 7 , "delta" , 2 )));
466
470
467
471
String messageVar2 = ""
468
- + ".match {$count :number icu:offset=$delta}\n "
472
+ + ".input {$count :number icu:offset=$delta}\n "
473
+ + ".match $count\n "
469
474
+ " 1 {{Exactly 1}}\n "
470
475
+ " 2 {{Exactly 2}}\n "
471
476
+ " * {{Count = {$count :number icu:offset=$delta} and delta={$delta}.}}" ;
@@ -505,7 +510,7 @@ public void testVariableOptionsInSelector() {
505
510
public void testVariableOptionsInSelectorWithLocalVar () {
506
511
String messageFix = ""
507
512
+ ".local $offCount = {$count :number icu:offset=2}"
508
- + ".match { $offCount :number} \n "
513
+ + ".match $offCount\n "
509
514
+ " 1 {{A}}\n "
510
515
+ " 2 {{A and B}}\n "
511
516
+ " one {{A, B, and {$offCount} more character}}\n "
@@ -520,7 +525,7 @@ public void testVariableOptionsInSelectorWithLocalVar() {
520
525
521
526
String messageVar = ""
522
527
+ ".local $offCount = {$count :number icu:offset=$delta}"
523
- + ".match { $offCount :number} \n "
528
+ + ".match $offCount\n "
524
529
+ " 1 {{A}}\n "
525
530
+ " 2 {{A and B}}\n "
526
531
+ " one {{A, B, and {$offCount} more character}}\n "
@@ -539,7 +544,7 @@ public void testVariableOptionsInSelectorWithLocalVar() {
539
544
540
545
String messageVar2 = ""
541
546
+ ".local $offCount = {$count :number icu:offset=$delta}"
542
- + ".match { $offCount :number} \n "
547
+ + ".match $offCount\n "
543
548
+ " 1 {{Exactly 1}}\n "
544
549
+ " 2 {{Exactly 2}}\n "
545
550
+ " * {{Count = {$count}, OffCount = {$offCount}, and delta={$delta}.}}" ;
0 commit comments