main
1import 'package:health_data_store/src/extensions/castable.dart';
2import 'package:test/expect.dart';
3import 'package:test/scaffolding.dart';
4
5void main() {
6 test('should cast null to null', () {
7 expect((null as Object?)?.castOrNull<String>(), null);
8 });
9 test('should cast int', () {
10 expect((123 as Object?)?.castOrNull<int>(), 123);
11 });
12 test('should not cast incorrectly', () {
13 expect((123 as Object?)?.castOrNull<double>(), null);
14 });
15}