Skip to content

Commit

Permalink
General update for Dart 3.x & misc fixes
Browse files Browse the repository at this point in the history
* update test & coverage scripts
* Update to version 2.1.0
* Update Dart dependencies
  • Loading branch information
greymouser committed Jun 15, 2023
1 parent 06f6a60 commit 0a54395
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 19 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ void main() {
print(n.toRomanNumeralString());
// ↈↈↈↂↇↁↀↀCCCCXLIX
// NOTE: if you see missing characters in this example, then you'll need to
// install a font that supports them.
str = 'ↈↈↈↂↇↁↀↀCCCCXLIX';
print(str.isValidRomanNumeralValue());
// true
Expand Down
13 changes: 4 additions & 9 deletions bin/coverage-gen
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,11 @@ while getopts "ih" o; do
done
shift $((OPTIND-1))

dart pub global activate coverage

mkdir -p coverage
dart test --coverage coverage || justdie "tests failed"
dart pub global run coverage:format_coverage \
--lcov \
--in coverage/test \
--out coverage/lcov.info \
--packages=.packages \
--report-on=lib \
|| justdie "report generation failed"
genhtml -o coverage coverage/lcov.info
dart pub global run coverage:test_with_coverage || justdie "tests failed"
genhtml -o coverage coverage/lcov.info || justdie "genhtml failed"

if [ -n "$opt_i" ] && exists_in_path open; then
open coverage/index.html
Expand Down
3 changes: 3 additions & 0 deletions bin/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

dart test --exclude-tags prerelease
3 changes: 3 additions & 0 deletions bin/test-all
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

dart test
2 changes: 2 additions & 0 deletions dart_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tags:
prerelease:
10 changes: 5 additions & 5 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: numerus
description: Dart extensions for translating integers to Roman numerals and Roman numeral strings to integers.
version: 2.0.0
version: 2.1.0
homepage: https://github.com/greymouser/dart-numerus

environment:
sdk: '>=2.16.0 <3.0.0' # Dart version
sdk: ^3.0.0 # Dart version - 3.0.0 to 4.0.0

dependencies:
characters: ^1.2.0
characters: ^1.3.0

dev_dependencies:
lints: ^1.0.1
test: ^1.20.1
lints: ^2.0.0
test: ^1.21.0
2 changes: 1 addition & 1 deletion test/roman/roman_apostrophus_compact_config_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void main() {
for (var n = 1; n < 400000; n += 1) {
expect(n.toRomanNumeralString() != null, true);
}
}, skip: 'Do not run every time.');
}, tags: 'prerelease');
});

group('String to int', () {
Expand Down
2 changes: 1 addition & 1 deletion test/roman/roman_apostrophus_config_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void main() {
for (var n = 1; n < 4000000; n += 1) {
expect(n.toRomanNumeralString() != null, true);
}
}, skip: 'Do not run every time.');
}, tags: 'prerelease');
});

group('String to int', () {
Expand Down
3 changes: 1 addition & 2 deletions test/roman/roman_common_config_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@ void main() {

test('all', () {
for (var n = 1; n < 4000; n += 1) {
print(n);
expect(n.toRomanNumeralString() != null, true);
}
}, skip: 'Do not run every time.');
}, tags: 'prerelease');
});

group('String to int', () {
Expand Down
2 changes: 1 addition & 1 deletion test/roman/roman_vinculum_config_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void main() {
for (var n = 1; n < 4000000; n += 1) {
expect(n.toRomanNumeralString() != null, true);
}
}, skip: 'Do not run every time.');
}, tags: 'prerelease');
});

group('String to int', () {
Expand Down

0 comments on commit 0a54395

Please sign in to comment.