Skip to content

Commit 856ce7e

Browse files
committed
Merge package:test_reflective_loader into the tools monorepo
2 parents 5590447 + 5d04224 commit 856ce7e

File tree

12 files changed

+643
-0
lines changed

12 files changed

+643
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Dependabot configuration file.
2+
# See https://docs.github.com/en/code-security/dependabot/dependabot-version-updates
3+
version: 2
4+
5+
updates:
6+
- package-ecosystem: github-actions
7+
directory: /
8+
schedule:
9+
interval: monthly
10+
labels:
11+
- autosubmit
12+
groups:
13+
github-actions:
14+
patterns:
15+
- "*"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Dart
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
schedule:
9+
# “At 00:00 (UTC) on Sunday.”
10+
- cron: '0 0 * * 0'
11+
12+
env:
13+
PUB_ENVIRONMENT: bot.github
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
sdk: [dev, 3.1]
22+
23+
steps:
24+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
25+
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
26+
with:
27+
sdk: ${{ matrix.sdk }}
28+
29+
- run: dart pub get
30+
- name: dart format
31+
run: dart format --output=none --set-exit-if-changed .
32+
- run: dart analyze --fatal-infos
33+
- run: dart test
Lines changed: 11 additions & 0 deletions
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

Lines changed: 6 additions & 0 deletions
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.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
## 0.2.3-wip
2+
3+
- Require Dart `^3.1.0`.
4+
5+
## 0.2.2
6+
7+
- Update to package:lints 2.0.0 and move it to a dev dependency.
8+
9+
## 0.2.1
10+
11+
- Use package:lints for analysis.
12+
- Populate the pubspec `repository` field.
13+
14+
## 0.2.0
15+
16+
- Stable null safety release.
17+
18+
## 0.2.0-nullsafety.0
19+
20+
- Migrate to the null safety language feature.
21+
22+
## 0.1.9
23+
24+
- Add `@SkippedTest` annotation and `skip_test` prefix.
25+
26+
## 0.1.8
27+
28+
- Update `FailingTest` to add named parameters `issue` and `reason`.
29+
30+
## 0.1.7
31+
32+
- Update documentation comments.
33+
- Remove `@MirrorsUsed` annotation on `dart:mirrors`.
34+
35+
## 0.1.6
36+
37+
- Make `FailingTest` public, with the URI of the issue that causes
38+
the test to break.
39+
40+
## 0.1.5
41+
42+
- Set max SDK version to `<3.0.0`, and adjust other dependencies.
43+
44+
## 0.1.3
45+
46+
- Fix `@failingTest` to fail when the test passes.
47+
48+
## 0.1.2
49+
50+
- Update the pubspec `dependencies` section to include `package:test`
51+
52+
## 0.1.1
53+
54+
- For `@failingTest` tests, properly handle when the test fails by throwing an
55+
exception in a timer task
56+
- Analyze this package in strong mode
57+
58+
## 0.1.0
59+
60+
- Switched from 'package:unittest' to 'package:test'.
61+
- Since 'package:test' does not define 'solo_test', in order to keep this
62+
functionality, `defineReflectiveSuite` must be used to wrap all
63+
`defineReflectiveTests` invocations.
64+
65+
## 0.0.4
66+
67+
- Added @failingTest, @assertFailingTest and @soloTest annotations.
68+
69+
## 0.0.1
70+
71+
- Initial version
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Want to contribute? Great! First, read this page (including the small print at
2+
the end).
3+
4+
### Before you contribute
5+
Before we can use your code, you must sign the
6+
[Google Individual Contributor License Agreement](https://cla.developers.google.com/about/google-individual)
7+
(CLA), which you can do online. The CLA is necessary mainly because you own the
8+
copyright to your changes, even after your contribution becomes part of our
9+
codebase, so we need your permission to use and distribute your code. We also
10+
need to be sure of various other things—for instance that you'll tell us if you
11+
know that your code infringes on other people's patents. You don't have to sign
12+
the CLA until after you've submitted your code for review and a member has
13+
approved it, but you must do it before we can put your code into our codebase.
14+
15+
Before you start working on a larger contribution, you should get in touch with
16+
us first through the issue tracker with your idea so that we can help out and
17+
possibly guide you. Coordinating up front makes it much easier to avoid
18+
frustration later on.
19+
20+
### Code reviews
21+
All submissions, including submissions by project members, require review.
22+
23+
### File headers
24+
All files in the project must start with the following header.
25+
26+
// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
27+
// for details. All rights reserved. Use of this source code is governed by a
28+
// BSD-style license that can be found in the LICENSE file.
29+
30+
### The small print
31+
Contributions made by corporations are covered by a different agreement than the
32+
one above, the
33+
[Software Grant and Corporate Contributor License Agreement](https://developers.google.com/open-source/cla/corporate).

pkgs/test_reflective_loader/LICENSE

Lines changed: 27 additions & 0 deletions
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

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