Skip to content

Commit

Permalink
Bump SDK version. (#139)
Browse files Browse the repository at this point in the history
Reformat to tall style.

Minor fixes for CFE metadata model changes.

Update `dart_style` version used by generator.
  • Loading branch information
davidmorgan authored Nov 12, 2024
1 parent 28643f3 commit b5ff382
Show file tree
Hide file tree
Showing 111 changed files with 5,392 additions and 4,439 deletions.
188 changes: 94 additions & 94 deletions .github/workflows/dart.yml

Large diffs are not rendered by default.

62 changes: 21 additions & 41 deletions goldens/foo/lib/json_codable_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ void main() {
{'x': 2},
],
'mapOfSerializableField': {
'c': {'x': 3}
'c': {'x': 3},
},
};

Expand Down Expand Up @@ -107,10 +107,7 @@ void main() {
});

test('class hierarchies', () {
var json = {
'x': 1,
'y': 'z',
};
var json = {'x': 1, 'y': 'z'};
var d = D.fromJson(json);
expect(d.x, 1);
expect(d.y, 'z');
Expand All @@ -123,34 +120,25 @@ void main() {
'listOfNullableInts': [null, 1],
'listOfNullableSerializables': [
{'x': 1},
null
null,
],
'listOfNullableMapsOfNullableInts': [
null,
{'a': 1, 'b': null},
],
'setOfNullableInts': [
null,
2,
],
'setOfNullableInts': [null, 2],
'setOfNullableSerializables': [
{'x': 2},
null,
],
'setOfNullableMapsOfNullableInts': [
null,
{
'a': 2,
'b': null,
},
{'a': 2, 'b': null},
],
'mapOfNullableInts': {
'a': 3,
'b': null,
},
'mapOfNullableInts': {'a': 3, 'b': null},
'mapOfNullableSerializables': {
'a': {'x': 3},
'b': null
'b': null,
},
'mapOfNullableSetsOfNullableInts': {
'a': [null, 3],
Expand All @@ -163,29 +151,23 @@ void main() {
expect(e.listOfNullableSerializables.first!.x, 1);
expect(e.listOfNullableSerializables[1], null);
expect(
e.listOfNullableMapsOfNullableInts,
equals([
null,
{'a': 1, 'b': null},
]));
e.listOfNullableMapsOfNullableInts,
equals([
null,
{'a': 1, 'b': null},
]),
);
expect(e.setOfNullableInts, equals({null, 2}));
expect(e.setOfNullableSerializables.first!.x, 2);
expect(e.setOfNullableSerializables.elementAt(1), null);
expect(
e.setOfNullableMapsOfNullableInts,
equals({
null,
{
'a': 2,
'b': null,
},
}));
expect(
e.mapOfNullableInts,
equals({
'a': 3,
'b': null,
}));
e.setOfNullableMapsOfNullableInts,
equals({
null,
{'a': 2, 'b': null},
}),
);
expect(e.mapOfNullableInts, equals({'a': 3, 'b': null}));
expect(e.mapOfNullableSerializables['a']!.x, 3);
expect(e.mapOfNullableSerializables.containsKey('b'), true);
expect(e.mapOfNullableSerializables['b'], null);
Expand All @@ -198,9 +180,7 @@ void main() {
});

test(r'field with dollar sign $', () {
var json = {
r'fieldWithDollarSign$': 1,
};
var json = {r'fieldWithDollarSign$': 1};
var f = F.fromJson(json);
expect(f.fieldWithDollarSign$, 1);

Expand Down
5 changes: 1 addition & 4 deletions goldens/foo/lib/literal_params.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ import 'package:_test_macros/literal_params.dart';
nums: [13.0, 14],
doubles: [15.0, 16],
strings: ['17', 'eighteen'],
objects: [
19,
Bar(a: true, b: false),
],
objects: [19, Bar(a: true, b: false)],
)
class Foo {}

Expand Down
2 changes: 1 addition & 1 deletion goldens/foo/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ publish-to: none
resolution: workspace

environment:
sdk: ^3.7.0-39.0.dev
sdk: ^3.7.0-123.0.dev

dependencies:
_test_macros: any
Loading

0 comments on commit b5ff382

Please sign in to comment.