Skip to content

Commit e74b109

Browse files
authored
chore(datastore): enable query predicate integ tests for float values (#1454)
1 parent 9fbc55d commit e74b109

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

packages/amplify_datastore/example/integration_test/query_test/query_predicate_test/float_query_predicate_test.dart

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ void main() {
3535
ModelWithAppsyncScalarTypes(floatValue: 0.1),
3636
ModelWithAppsyncScalarTypes(floatValue: 2.1),
3737
ModelWithAppsyncScalarTypes(floatValue: 1000.0),
38-
ModelWithAppsyncScalarTypes(floatValue: double.maxFinite),
39-
ModelWithAppsyncScalarTypes(floatValue: double.minPositive),
38+
ModelWithAppsyncScalarTypes(floatValue: 999999999.0),
39+
ModelWithAppsyncScalarTypes(floatValue: -999999999.0),
4040
ModelWithAppsyncScalarTypes(floatValue: pi),
4141
ModelWithAppsyncScalarTypes(),
4242
];
4343

4444
// a value that will return 1 or 0 when compared to each test value
45-
var maxDoubleValue = double.maxFinite;
45+
var maxDoubleValue = 999999999.0;
4646

4747
// a that will return 0 or -1 when compared to each test value
48-
var minDoubleValue = double.minPositive;
48+
var minDoubleValue = -999999999.0;
4949

5050
// non-null models used for all tests
5151
var nonNullModels = models.where((e) => e.floatValue != null).toList();
@@ -125,8 +125,6 @@ void main() {
125125
expectedModels: [],
126126
);
127127
},
128-
// see: https://github.com/aws-amplify/amplify-flutter/issues/830
129-
skip: true,
130128
);
131129

132130
testWidgets(
@@ -150,8 +148,6 @@ void main() {
150148
expectedModels: nonNullModels,
151149
);
152150
},
153-
// see: https://github.com/aws-amplify/amplify-flutter/issues/830
154-
skip: true,
155151
);
156152

157153
testWidgets(
@@ -175,8 +171,6 @@ void main() {
175171
expectedModels: [],
176172
);
177173
},
178-
// see: https://github.com/aws-amplify/amplify-flutter/issues/830
179-
skip: true,
180174
);
181175

182176
testWidgets(
@@ -200,8 +194,6 @@ void main() {
200194
expectedModels: nonNullModels,
201195
);
202196
},
203-
// see: https://github.com/aws-amplify/amplify-flutter/issues/830
204-
skip: true,
205197
);
206198

207199
testWidgets('beginsWith()', (WidgetTester tester) async {
@@ -308,8 +300,6 @@ void main() {
308300
expectedModels: [],
309301
);
310302
},
311-
// see: https://github.com/aws-amplify/amplify-flutter/issues/830
312-
skip: true,
313303
);
314304
});
315305
}

packages/amplify_datastore/example/integration_test/utils/query_predicate_utils.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
// permissions and limitations under the License.
1414
//
1515

16-
import 'package:amplify_datastore_plugin_interface/amplify_datastore_plugin_interface.dart';
1716
import 'package:amplify_flutter/amplify_flutter.dart';
1817
import 'package:flutter_test/flutter_test.dart';
1918

0 commit comments

Comments
 (0)