Skip to content

Commit 2444fb1

Browse files
committed
working!
1 parent e6fd556 commit 2444fb1

File tree

4 files changed

+8
-120
lines changed

4 files changed

+8
-120
lines changed

json_serializable/build.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ builders:
9595
- .map_test.dart
9696
- .num_test.dart
9797
- .object_test.dart
98-
- .record_test.dart
9998
- .set_test.dart
10099
- .string_test.dart
101100
- .uri_test.dart

json_serializable/test/kitchen_sink/kitchen_sink_test_shared.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,7 @@ const invalidValueTypes = {
8383
'invalid_key': true,
8484
},
8585
'validatedPropertyNo42': true,
86-
'recordField': {
87-
'\$1': 1,
88-
'\$2': 'other string',
89-
'truth': false,
90-
},
86+
'recordField': true,
9187
};
9288

9389
const disallowNullKeys = {

json_serializable/test/supported_types/type_test.record_test.dart

Lines changed: 0 additions & 107 deletions
This file was deleted.

json_serializable/tool/test_type_builder.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const _trivialTypesToTest = {
5959
),
6060
};
6161

62-
Iterable<String> supportedTypes() => _typesToTest.keys;
62+
Iterable<String> supportedTypes() => _allTypes.keys;
6363

6464
Iterable<String> collectionTypes() => _collectionTypes.keys;
6565

@@ -89,16 +89,17 @@ final _collectionTypes = {
8989
),
9090
recordType: TestTypeData(
9191
altJsonExpression: '{}',
92-
jsonExpression: '{}',
9392
genericArgs: _iterableGenericArgs,
9493
)
9594
};
9695

97-
final _typesToTest = {
96+
final _allTypes = {
9897
..._trivialTypesToTest,
9998
..._collectionTypes,
10099
};
101100

101+
final _typesToTest = Map.of(_allTypes)..remove(recordType);
102+
102103
Iterable<String> get mapKeyTypes =>
103104
allowedMapKeyTypes.map((e) => e == 'enum' ? customEnumType : e).toList()
104105
..sort(compareAsciiLowerCase);
@@ -127,7 +128,7 @@ class _TypeBuilder implements Builder {
127128

128129
final sourceContent = await buildStep.readAsString(inputId);
129130

130-
for (var entry in _typesToTest.entries) {
131+
for (var entry in _allTypes.entries) {
131132
final type = entry.key;
132133
final newId = buildStep.inputId.changeExtension(toTypeExtension(type));
133134

@@ -139,9 +140,8 @@ class _TypeBuilder implements Builder {
139140
}
140141

141142
@override
142-
Map<String, List<String>> get buildExtensions => {
143-
'.dart': _typesToTest.keys.map(toTypeExtension).toSet().toList()..sort()
144-
};
143+
Map<String, List<String>> get buildExtensions =>
144+
{'.dart': _allTypes.keys.map(toTypeExtension).toSet().toList()..sort()};
145145
}
146146

147147
Builder typeTestBuilder([_]) =>

0 commit comments

Comments
 (0)