22// for details. All rights reserved. Use of this source code is governed by a
33// BSD-style license that can be found in the LICENSE file.
44
5- /// Tests for the MessageFormat class.
6- ///
7- /// Currently, these tests are the ones directly ported from Closure.
5+ // Tests for the MessageFormat class.
6+ //
7+ // Currently, these tests are the ones directly ported from Closure.
88
99import 'package:intl/message_format.dart' ;
1010import 'package:test/test.dart' ;
@@ -375,7 +375,7 @@ void main() {
375375 expect (fmt.format ({'NUM_FLOOR' : 25 }), 'Other 23' );
376376 });
377377
378- ignoreTest ('testSimpleOrdinal' , () {
378+ test ('testSimpleOrdinal' , () {
379379 // TOFIX. Ordinal not supported in Dart
380380 var fmt = MessageFormat ('{NUM_FLOOR, selectordinal, '
381381 'one {Take the elevator to the #st floor.}'
@@ -391,9 +391,9 @@ void main() {
391391 fmt.format ({'NUM_FLOOR' : 23 }), 'Take the elevator to the 23rd floor.' );
392392 // Esoteric example.
393393 expect (fmt.format ({'NUM_FLOOR' : 0 }), 'Take the elevator to the 0th floor.' );
394- });
394+ }, skip : 'Ordinal not supported in Dart' );
395395
396- ignoreTest ('testOrdinalWithNegativeValue' , () {
396+ test ('testOrdinalWithNegativeValue' , () {
397397 // TOFIX. Ordinal not supported in Dart
398398 var fmt = MessageFormat ('{NUM_FLOOR, selectordinal, '
399399 'one {Take the elevator to the #st floor.}'
@@ -409,9 +409,9 @@ void main() {
409409 fmt.format ({'NUM_FLOOR' : - 3 }), 'Take the elevator to the -3rd floor.' );
410410 expect (
411411 fmt.format ({'NUM_FLOOR' : - 4 }), 'Take the elevator to the -4th floor.' );
412- });
412+ }, skip : 'Ordinal not supported in Dart' );
413413
414- ignoreTest ('testSimpleOrdinalWithIgnorePound' , () {
414+ test ('testSimpleOrdinalWithIgnorePound' , () {
415415 // TOFIX. Ordinal not supported in Dart
416416 var fmt = MessageFormat ('{NUM_FLOOR, selectordinal, '
417417 'one {Take the elevator to the #st floor.}'
@@ -423,7 +423,7 @@ void main() {
423423 'Take the elevator to the #th floor.' );
424424 });
425425
426- ignoreTest ('testMissingOrInvalidOrdinalParameter' , () {
426+ test ('testMissingOrInvalidOrdinalParameter' , () {
427427 // TOFIX. Ordinal not supported in Dart
428428 var fmt = MessageFormat ('{SOME_NUM, selectordinal, other {result}}' );
429429
@@ -434,11 +434,5 @@ void main() {
434434 // Value is not a number.
435435 expect (fmt.format ({'SOME_NUM' : 'Value' }),
436436 'Undefined or invalid parameter - SOME_NUM' );
437- });
437+ }, skip : 'Ordinal not supported in Dart' );
438438} // end of main
439-
440- // Disabling unit tests without having to comment the whole body.
441- // Similar to @Ignore in JUnit
442- void ignoreTest (description, body) {
443- print ('\u 001b[93mTest ignored: $description \u 001b[m' );
444- }
0 commit comments