diff --git a/test/.gitignore b/test/.gitignore new file mode 100644 index 0000000..3a85790 --- /dev/null +++ b/test/.gitignore @@ -0,0 +1,3 @@ +# https://dart.dev/guides/libraries/private-files +# Created by `dart pub` +.dart_tool/ diff --git a/test/CHANGELOG.md b/test/CHANGELOG.md new file mode 100644 index 0000000..effe43c --- /dev/null +++ b/test/CHANGELOG.md @@ -0,0 +1,3 @@ +## 1.0.0 + +- Initial version. diff --git a/test/README.md b/test/README.md new file mode 100644 index 0000000..3816eca --- /dev/null +++ b/test/README.md @@ -0,0 +1,2 @@ +A sample command-line application with an entrypoint in `bin/`, library code +in `lib/`, and example unit test in `test/`. diff --git a/test/analysis_options.yaml b/test/analysis_options.yaml new file mode 100644 index 0000000..dee8927 --- /dev/null +++ b/test/analysis_options.yaml @@ -0,0 +1,30 @@ +# This file configures the static analysis results for your project (errors, +# warnings, and lints). +# +# This enables the 'recommended' set of lints from `package:lints`. +# This set helps identify many issues that may lead to problems when running +# or consuming Dart code, and enforces writing Dart using a single, idiomatic +# style and format. +# +# If you want a smaller set of lints you can change this to specify +# 'package:lints/core.yaml'. These are just the most critical lints +# (the recommended set includes the core lints). +# The core lints are also what is used by pub.dev for scoring packages. + +include: package:lints/recommended.yaml + +# Uncomment the following section to specify additional rules. + +# linter: +# rules: +# - camel_case_types + +# analyzer: +# exclude: +# - path/to/excluded/files/** + +# For more information about the core and recommended set of lints, see +# https://dart.dev/go/core-lints + +# For additional information about configuring this file, see +# https://dart.dev/guides/language/analysis-options diff --git a/test/bin/test.dart b/test/bin/test.dart new file mode 100644 index 0000000..1f1b35a --- /dev/null +++ b/test/bin/test.dart @@ -0,0 +1,5 @@ +import 'package:test/test.dart' as test; + +void main(List arguments) { + print('Hello world: ${test.calculate()}!'); +} diff --git a/test/lib/test.dart b/test/lib/test.dart new file mode 100644 index 0000000..f64ad72 --- /dev/null +++ b/test/lib/test.dart @@ -0,0 +1,3 @@ +int calculate() { + return 6 * 7; +} diff --git a/test/pubspec.yaml b/test/pubspec.yaml new file mode 100644 index 0000000..2a0e8a4 --- /dev/null +++ b/test/pubspec.yaml @@ -0,0 +1,15 @@ +name: test +description: A sample command-line application. +version: 1.0.0 +# repository: https://github.com/my_org/my_repo + +environment: + sdk: ^3.4.4 + +# Add regular dependencies here. +dependencies: + # path: ^1.8.0 + +dev_dependencies: + lints: ^3.0.0 + test: ^1.24.0 diff --git a/test/test/test_test.dart b/test/test/test_test.dart new file mode 100644 index 0000000..4bf74f8 --- /dev/null +++ b/test/test/test_test.dart @@ -0,0 +1,8 @@ +import 'package:test/test.dart'; +import 'package:test/test.dart'; + +void main() { + test('calculate', () { + expect(calculate(), 42); + }); +}