This repository has been archived by the owner on Jan 14, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from dart-lang/tests
add tests, travis support, some lints
- Loading branch information
Showing
5 changed files
with
64 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
language: dart | ||
script: ./tool/travis.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
import 'dart:async'; | ||
|
||
import 'package:test/test.dart'; | ||
import 'package:test_reflective_loader/test_reflective_loader.dart'; | ||
|
||
void main() { | ||
defineReflectiveSuite(() { | ||
defineReflectiveTests(TestReflectiveLoaderTest); | ||
}); | ||
} | ||
|
||
@reflectiveTest | ||
class TestReflectiveLoaderTest { | ||
String pathname; | ||
|
||
void test_passes() { | ||
expect(true, true); | ||
} | ||
|
||
@failingTest | ||
void test_fails() { | ||
expect(false, true); | ||
} | ||
|
||
@failingTest | ||
void test_fails_throws_sync() { | ||
throw 'foo'; | ||
} | ||
|
||
@failingTest | ||
Future test_fails_throws_async() { | ||
return new Future.error('foo'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
# Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | ||
# for details. All rights reserved. Use of this source code is governed by a | ||
# BSD-style license that can be found in the LICENSE file. | ||
|
||
# Fast fail the script on failures. | ||
set -e | ||
|
||
# Verify that the libraries are error free. | ||
dartanalyzer --fatal-warnings \ | ||
lib/test_reflective_loader.dart \ | ||
test/test_reflective_loader_test.dart | ||
|
||
# Run the tests. | ||
dart test/test_reflective_loader_test.dart |