Skip to content

Commit febccb9

Browse files
authored
Merge pull request #1664 from dart-lang/merge-test_reflective_loader-package
Merge `package:test_reflective_loader`
2 parents b78c509 + bea4a35 commit febccb9

13 files changed

+617
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
name: "package:test_reflective_loader"
3+
about: "Create a bug or file a feature request against package:test_reflective_loader."
4+
labels: "package:test_reflective_loader"
5+
---

.github/labeler.yml

+4
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@
108108
- changed-files:
109109
- any-glob-to-any-file: 'pkgs/sse/**'
110110

111+
'package:test_reflective_loader':
112+
- changed-files:
113+
- any-glob-to-any-file: 'pkgs/test_reflective_loader/**'
114+
111115
'package:timing':
112116
- changed-files:
113117
- any-glob-to-any-file: 'pkgs/timing/**'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: package:test_reflective_loader
2+
3+
on:
4+
# Run on PRs and pushes to the default branch.
5+
push:
6+
branches: [ main ]
7+
paths:
8+
- '.github/workflows/test_reflective_loader.yaml'
9+
- 'pkgs/test_reflective_loader/**'
10+
pull_request:
11+
branches: [ main ]
12+
paths:
13+
- '.github/workflows/test_reflective_loader.yaml'
14+
- 'pkgs/test_reflective_loader/**'
15+
schedule:
16+
- cron: "0 0 * * 0"
17+
18+
env:
19+
PUB_ENVIRONMENT: bot.github
20+
21+
defaults:
22+
run:
23+
working-directory: pkgs/test_reflective_loader/
24+
25+
jobs:
26+
build:
27+
runs-on: ubuntu-latest
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
sdk: [dev, 3.1]
32+
33+
steps:
34+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
35+
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
36+
with:
37+
sdk: ${{ matrix.sdk }}
38+
39+
- run: dart pub get
40+
- name: dart format
41+
run: dart format --output=none --set-exit-if-changed .
42+
- run: dart analyze --fatal-infos
43+
- run: dart test

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ don't naturally belong to other topic monorepos (like
4040
| [source_maps](pkgs/source_maps/) | A library to programmatically manipulate source map files. | [![package issues](https://img.shields.io/badge/package:source_maps-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Asource_maps) | [![pub package](https://img.shields.io/pub/v/source_maps.svg)](https://pub.dev/packages/source_maps) |
4141
| [source_span](pkgs/source_span/) | Provides a standard representation for source code locations and spans. | [![package issues](https://img.shields.io/badge/package:source_span-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Asource_span) | [![pub package](https://img.shields.io/pub/v/source_span.svg)](https://pub.dev/packages/source_span) |
4242
| [sse](pkgs/sse/) | Provides client and server functionality for setting up bi-directional communication through Server Sent Events (SSE) and corresponding POST requests. | [![package issues](https://img.shields.io/badge/package:sse-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Asse) | [![pub package](https://img.shields.io/pub/v/sse.svg)](https://pub.dev/packages/sse) |
43+
| [test_reflective_loader](pkgs/test_reflective_loader/) | Support for discovering tests and test suites using reflection. | [![package issues](https://img.shields.io/badge/package:test_reflective_loader-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Atest_reflective_loader) | [![pub package](https://img.shields.io/pub/v/test_reflective_loader.svg)](https://pub.dev/packages/test_reflective_loader) |
4344
| [timing](pkgs/timing/) | A simple package for tracking the performance of synchronous and asynchronous actions. | [![package issues](https://img.shields.io/badge/package:timing-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Atiming) | [![pub package](https://img.shields.io/pub/v/timing.svg)](https://pub.dev/packages/timing) |
4445
| [unified_analytics](pkgs/unified_analytics/) | A package for logging analytics for all Dart and Flutter related tooling to Google Analytics. | [![package issues](https://img.shields.io/badge/package:unified_analytics-4774bc)](https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Aunified_analytics) | [![pub package](https://img.shields.io/pub/v/unified_analytics.svg)](https://pub.dev/packages/unified_analytics) |
4546

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.buildlog
2+
.DS_Store
3+
.idea
4+
.dart_tool/
5+
.pub/
6+
.project
7+
.settings/
8+
build/
9+
packages
10+
.packages
11+
pubspec.lock

pkgs/test_reflective_loader/AUTHORS

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Below is a list of people and organizations that have contributed
2+
# to the project. Names should be added to the list like so:
3+
#
4+
# Name/Organization <email address>
5+
6+
Google Inc.
+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
## 0.2.3
2+
3+
- Require Dart `^3.1.0`.
4+
- Move to `dart-lang/tools` monorepo.
5+
6+
## 0.2.2
7+
8+
- Update to package:lints 2.0.0 and move it to a dev dependency.
9+
10+
## 0.2.1
11+
12+
- Use package:lints for analysis.
13+
- Populate the pubspec `repository` field.
14+
15+
## 0.2.0
16+
17+
- Stable null safety release.
18+
19+
## 0.2.0-nullsafety.0
20+
21+
- Migrate to the null safety language feature.
22+
23+
## 0.1.9
24+
25+
- Add `@SkippedTest` annotation and `skip_test` prefix.
26+
27+
## 0.1.8
28+
29+
- Update `FailingTest` to add named parameters `issue` and `reason`.
30+
31+
## 0.1.7
32+
33+
- Update documentation comments.
34+
- Remove `@MirrorsUsed` annotation on `dart:mirrors`.
35+
36+
## 0.1.6
37+
38+
- Make `FailingTest` public, with the URI of the issue that causes
39+
the test to break.
40+
41+
## 0.1.5
42+
43+
- Set max SDK version to `<3.0.0`, and adjust other dependencies.
44+
45+
## 0.1.3
46+
47+
- Fix `@failingTest` to fail when the test passes.
48+
49+
## 0.1.2
50+
51+
- Update the pubspec `dependencies` section to include `package:test`
52+
53+
## 0.1.1
54+
55+
- For `@failingTest` tests, properly handle when the test fails by throwing an
56+
exception in a timer task
57+
- Analyze this package in strong mode
58+
59+
## 0.1.0
60+
61+
- Switched from 'package:unittest' to 'package:test'.
62+
- Since 'package:test' does not define 'solo_test', in order to keep this
63+
functionality, `defineReflectiveSuite` must be used to wrap all
64+
`defineReflectiveTests` invocations.
65+
66+
## 0.0.4
67+
68+
- Added @failingTest, @assertFailingTest and @soloTest annotations.
69+
70+
## 0.0.1
71+
72+
- Initial version

pkgs/test_reflective_loader/LICENSE

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Copyright 2015, the Dart project authors.
2+
3+
Redistribution and use in source and binary forms, with or without
4+
modification, are permitted provided that the following conditions are
5+
met:
6+
7+
* Redistributions of source code must retain the above copyright
8+
notice, this list of conditions and the following disclaimer.
9+
* Redistributions in binary form must reproduce the above
10+
copyright notice, this list of conditions and the following
11+
disclaimer in the documentation and/or other materials provided
12+
with the distribution.
13+
* Neither the name of Google LLC nor the names of its
14+
contributors may be used to endorse or promote products derived
15+
from this software without specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

pkgs/test_reflective_loader/README.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[![Build Status](https://github.com/dart-lang/tools/actions/workflows/test_reflective_loader.yaml/badge.svg)](https://github.com/dart-lang/tools/actions/workflows/test_reflective_loader.yaml)
2+
[![pub package](https://img.shields.io/pub/v/test_reflective_loader.svg)](https://pub.dev/packages/test_reflective_loader)
3+
[![package publisher](https://img.shields.io/pub/publisher/test_reflective_loader.svg)](https://pub.dev/packages/test_reflective_loader/publisher)
4+
5+
Support for discovering tests and test suites using reflection.
6+
7+
This package follows the xUnit style where each class is a test suite, and each
8+
method with the name prefix `test_` is a single test.
9+
10+
Methods with names starting with `test_` are run using the `test()` function with
11+
the corresponding name. If the class defines methods `setUp()` or `tearDown()`,
12+
they are executed before / after each test correspondingly, even if the test fails.
13+
14+
Methods with names starting with `solo_test_` are run using the `solo_test()` function.
15+
16+
Methods with names starting with `fail_` are expected to fail.
17+
18+
Methods with names starting with `solo_fail_` are run using the `solo_test()` function
19+
and expected to fail.
20+
21+
Method returning `Future` class instances are asynchronous, so `tearDown()` is
22+
executed after the returned `Future` completes.
23+
24+
## Features and bugs
25+
26+
Please file feature requests and bugs at the [issue tracker][tracker].
27+
28+
[tracker]: https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Atest_reflective_loader
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
include: package:dart_flutter_team_lints/analysis_options.yaml
2+
3+
linter:
4+
rules:
5+
- public_member_api_docs

0 commit comments

Comments
 (0)