diff --git a/pubspec.yaml b/pubspec.yaml index 66f5e91..7d361e3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -7,7 +7,6 @@ version: 1.0.1 homepage: https://github.com/acamarata/nrel-spa-dart repository: https://github.com/acamarata/nrel-spa-dart issue_tracker: https://github.com/acamarata/nrel-spa-dart/issues -publisher: ariccamarata.com topics: - solar - astronomy diff --git a/test/nrel_spa_test.dart b/test/nrel_spa_test.dart index e46c365..3399802 100644 --- a/test/nrel_spa_test.dart +++ b/test/nrel_spa_test.dart @@ -126,24 +126,26 @@ void main() { expect(result.incidence.isNaN, isTrue); }); - test('matches spaZaRts zenith/azimuth to within floating point tolerance', - () { - final za = getSpa( - DateTime.utc(2024, 3, 15, 12, 0, 0), - 40.7128, - -74.0060, - -5.0, - functionCode: spaZa, - ); - final rts = getSpa( - DateTime.utc(2024, 3, 15, 12, 0, 0), - 40.7128, - -74.0060, - -5.0, - ); - expect((za.zenith - rts.zenith).abs(), lessThan(1e-10)); - expect((za.azimuth - rts.azimuth).abs(), lessThan(1e-10)); - }); + test( + 'matches spaZaRts zenith/azimuth to within floating point tolerance', + () { + final za = getSpa( + DateTime.utc(2024, 3, 15, 12, 0, 0), + 40.7128, + -74.0060, + -5.0, + functionCode: spaZa, + ); + final rts = getSpa( + DateTime.utc(2024, 3, 15, 12, 0, 0), + 40.7128, + -74.0060, + -5.0, + ); + expect((za.zenith - rts.zenith).abs(), lessThan(1e-10)); + expect((za.azimuth - rts.azimuth).abs(), lessThan(1e-10)); + }, + ); test('throws when customAngles used with spaZa', () { expect( @@ -366,8 +368,13 @@ void main() { test('throws for invalid functionCode', () { expect( - () => getSpa(DateTime.utc(2024, 1, 1), 40.0, -74.0, -5.0, - functionCode: 4), + () => getSpa( + DateTime.utc(2024, 1, 1), + 40.0, + -74.0, + -5.0, + functionCode: 4, + ), throwsA(isA()), ); }); @@ -420,10 +427,7 @@ void main() { ); expect(result.angles.length, equals(1)); expect(result.angles[0], isA()); - expect( - result.angles[0].sunrise, - matches(RegExp(r'^\d{2}:\d{2}:\d{2}$')), - ); + expect(result.angles[0].sunrise, matches(RegExp(r'^\d{2}:\d{2}:\d{2}$'))); }); test('incidence populated for spaAll', () {