From adc115f4d2d0e4de7d56dd65a68429c439e20531 Mon Sep 17 00:00:00 2001 From: Clement Skau Date: Fri, 22 Mar 2019 15:31:43 +0100 Subject: [PATCH] Adds `skip` to common_tests.dart `test` function. Uses it for failing tests. (dart-lang/file#121) --- pkgs/file/test/common_tests.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/file/test/common_tests.dart b/pkgs/file/test/common_tests.dart index 1e5b9f2ba..23923eb47 100644 --- a/pkgs/file/test/common_tests.dart +++ b/pkgs/file/test/common_tests.dart @@ -98,10 +98,10 @@ void runCommonTests( void group(String description, void body()) => skipIfNecessary(description, () => testpkg.group(description, body)); - void test(String description, FutureOr body()) => + void test(String description, FutureOr body(), {dynamic skip}) => skipIfNecessary(description, () { if (replay == null) { - testpkg.test(description, body); + testpkg.test(description, body, skip: skip); } else { group('rerun', () { testpkg.setUp(() async { @@ -114,7 +114,7 @@ void runCommonTests( await Future.forEach(setUps, (SetUpTearDown setUp) => setUp()); }); - testpkg.test(description, body); + testpkg.test(description, body, skip: skip); testpkg.tearDown(() async { for (SetUpTearDown tearDown in tearDowns) { @@ -179,7 +179,7 @@ void runCommonTests( test('considersBothSlashesEquivalent', () { fs.directory(r'foo\bar_dir').createSync(recursive: true); expect(fs.directory(r'foo/bar_dir'), exists); - }); + }, skip: "Fails due to https://github.com/google/file.dart/issues/112"); }); group('file', () { @@ -210,7 +210,7 @@ void runCommonTests( test('considersBothSlashesEquivalent', () { fs.file(r'foo\bar_file').createSync(recursive: true); expect(fs.file(r'foo/bar_file'), exists); - }); + }, skip: "Fails due to https://github.com/google/file.dart/issues/112"); }); group('link', () {