mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-25 08:50:40 +00:00
17 lines
514 B
Dart
17 lines
514 B
Dart
|
import 'package:flutter_test/flutter_test.dart';
|
||
|
import 'package:lightmeter/utils/to_string_signed.dart';
|
||
|
|
||
|
void main() {
|
||
|
test('toStringSignedAsFixed(0)', () {
|
||
|
expect(1.5.toStringSignedAsFixed(0), '+2');
|
||
|
expect((-1.5).toStringSignedAsFixed(0), '-2');
|
||
|
expect(0.0.toStringSignedAsFixed(0), '0');
|
||
|
});
|
||
|
|
||
|
test('toStringSignedAsFixed(1)', () {
|
||
|
expect(1.5.toStringSignedAsFixed(1), '+1.5');
|
||
|
expect((-1.5).toStringSignedAsFixed(1), '-1.5');
|
||
|
expect(0.0.toStringSignedAsFixed(1), '0.0');
|
||
|
});
|
||
|
}
|