mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-25 17:00:39 +00:00
16 lines
514 B
Dart
16 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');
|
|
});
|
|
}
|