Skip to content

Commit

Permalink
Write some unit tests for size_extension
Browse files Browse the repository at this point in the history
  • Loading branch information
imaNNeo committed Dec 27, 2024
1 parent 32f0b58 commit f628212
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/extensions/size_extension_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import 'dart:ui';

import 'package:fl_chart/src/extensions/size_extension.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
test('test rotateByQuarterTurns extension.', () {
expect(const Size(100, 200).rotateByQuarterTurns(0), const Size(100, 200));
expect(const Size(100, 200).rotateByQuarterTurns(1), const Size(200, 100));
expect(const Size(100, 200).rotateByQuarterTurns(2), const Size(100, 200));
expect(const Size(100, 200).rotateByQuarterTurns(3), const Size(200, 100));
expect(const Size(100, 200).rotateByQuarterTurns(4), const Size(100, 200));
expect(const Size(100, 200).rotateByQuarterTurns(5), const Size(200, 100));
expect(const Size(100, 200).rotateByQuarterTurns(6), const Size(100, 200));
});
}

0 comments on commit f628212

Please sign in to comment.