From 439f73d3fafd850e445162ac41d163c7f9b9cb9f Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 30 Jan 2023 14:07:21 -0800 Subject: [PATCH 1/2] checks: add an example --- pkgs/checks/CHANGELOG.md | 4 ++++ pkgs/checks/example/example.dart | 19 +++++++++++++++++++ pkgs/checks/pubspec.yaml | 2 +- 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 pkgs/checks/example/example.dart diff --git a/pkgs/checks/CHANGELOG.md b/pkgs/checks/CHANGELOG.md index 88df1417c..dfa30caf3 100644 --- a/pkgs/checks/CHANGELOG.md +++ b/pkgs/checks/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.1.1-dev + +- Added an example. + # 0.1.0 - Initial release. diff --git a/pkgs/checks/example/example.dart b/pkgs/checks/example/example.dart new file mode 100644 index 000000000..4d9ad622b --- /dev/null +++ b/pkgs/checks/example/example.dart @@ -0,0 +1,19 @@ +import 'package:checks/checks.dart'; +import 'package:test/scaffolding.dart'; + +void main() { + test('sample test', () { + final someValue = 5; + checkThat(someValue).equals(5); + + final someList = [1, 2, 3, 4, 5]; + checkThat(someList).deepEquals([1, 2, 3, 4, 5]); + + final someString = 'abcdefghijklmnopqrstuvwxyz'; + + checkThat(someString) + ..startsWith('a') + ..endsWith('z') + ..contains('lmno'); + }); +} diff --git a/pkgs/checks/pubspec.yaml b/pkgs/checks/pubspec.yaml index fa4f8373d..a2b6fbc49 100644 --- a/pkgs/checks/pubspec.yaml +++ b/pkgs/checks/pubspec.yaml @@ -1,5 +1,5 @@ name: checks -version: 0.1.0 +version: 0.1.1-dev description: >- A framework for checking values against expectations and building custom expectations. From 204d43c5a09736725f4f1c607c887e3a0c8add3b Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 30 Jan 2023 14:15:46 -0800 Subject: [PATCH 2/2] Update example.dart --- pkgs/checks/example/example.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/checks/example/example.dart b/pkgs/checks/example/example.dart index 4d9ad622b..621d42d17 100644 --- a/pkgs/checks/example/example.dart +++ b/pkgs/checks/example/example.dart @@ -1,3 +1,7 @@ +// Copyright (c) 2023, 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 'package:checks/checks.dart'; import 'package:test/scaffolding.dart';