-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FED-734 CI cleanup: remove failing stable config, add 2.18 config #805
Changes from 12 commits
c80c972
d6e5103
e319142
557b05f
c434dea
eeab663
80cb1eb
10120cf
160b45e
05c135e
cd883e3
d2558be
5b6fa03
1311722
0269012
14b325e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import 'package:logging/logging.dart'; | ||
import 'package:mockito/annotations.dart'; | ||
|
||
@GenerateMocks([], customMocks: [ | ||
MockSpec<Logger>(returnNullOnMissingStub: true), | ||
MockSpec<List>(fallbackGenerators: { | ||
#[]: listIndexOperatorShim, | ||
#removeAt: listRemoveAtShim, | ||
#removeLast: listRemoveLastShim, | ||
}, returnNullOnMissingStub: true), | ||
MockSpec<Map>(fallbackGenerators: { | ||
#update: mapUpdateShim, | ||
#putIfAbsent: mapPutIfAbsentShim, | ||
}, returnNullOnMissingStub: true) | ||
]) | ||
void main() {} | ||
|
||
dynamic listIndexOperatorShim(int index) => 1; | ||
dynamic listRemoveAtShim(int index) => 1; | ||
dynamic listRemoveLastShim() => 1; | ||
|
||
String mapUpdateShim<K, V>(K key, V Function(V value) update, | ||
{V Function() ifAbsent}) => | ||
'value'; | ||
String mapPutIfAbsentShim<K, V>(K key, V Function() ifAbsent) => 'value'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Mocks generated by Mockito 5.0.15 from annotations | ||
// in over_react/test/mockito.dart. | ||
// Do not manually edit this file. | ||
|
||
// ignore_for_file: no_leading_underscores_for_library_prefixes | ||
import 'package:logging/src/logger.dart' as _i2; | ||
import 'package:mockito/mockito.dart' as _i1; | ||
|
||
// ignore_for_file: avoid_redundant_argument_values | ||
// ignore_for_file: avoid_setters_without_getters | ||
// ignore_for_file: comment_references | ||
// ignore_for_file: implementation_imports | ||
// ignore_for_file: invalid_use_of_visible_for_testing_member | ||
// ignore_for_file: prefer_const_constructors | ||
// ignore_for_file: unnecessary_parenthesis | ||
|
||
/// A class which mocks [Logger]. | ||
/// | ||
/// See the documentation for Mockito's code generation for more information. | ||
class MockLogger extends _i1.Mock implements _i2.Logger {} | ||
|
||
/// A class which mocks [List]. | ||
/// | ||
/// See the documentation for Mockito's code generation for more information. | ||
class MockList<E> extends _i1.Mock implements List<E> {} | ||
|
||
/// A class which mocks [Map]. | ||
/// | ||
/// See the documentation for Mockito's code generation for more information. | ||
class MockMap<K, V> extends _i1.Mock implements Map<K, V> {} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1063,19 +1063,25 @@ main() { | |
expect(result2, same(result1), reason: 'should have returned the same object'); | ||
}, tags: 'no-ddc'); | ||
|
||
test('unless the runtime is the DDC', () { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Basically, before we were testing that caching wasn't happening in DDC, which wasn't really the behavior we wanted ensure. I replaced it with a test that validates that it doesn't break, which is really the behavior we're after, at least for older SDKs. |
||
// A previous version of this test asserted that caching didn't take place, but that's | ||
// no longer true in newer SDKs since Expando started using WeakMap in Dart 2.14.0: https://github.com/dart-lang/sdk/commit/460887d8149748d3feaad857f1b13721faadeffa, | ||
// so we can't test that behavior having different tests for different SDKs. | ||
// Once we raise our minimums, we can update the test above to run on DDC as well. | ||
// Until then, just ensure the implementation isn't broken in DDC, as a regression test for older SDKs. | ||
test('and works without throwing in DDC', () { | ||
final element = factory({ | ||
'dartProp': 'dart' | ||
}) as ReactElement; | ||
|
||
var result1 = getProps(element); | ||
var result2 = getProps(element); | ||
|
||
expect(result1, containsPair('dartProp', 'dart'), reason: 'test setup sanity check'); | ||
expect(result2, isNot(same(result1)), | ||
reason: 'if this test fails, then it\'s possible that the bug was fixed in' | ||
' a newer version of the Dart SDK, and this test can be removed!'); | ||
}, tags: 'ddc'); | ||
dynamic result1; | ||
dynamic result2; | ||
expect(() { | ||
result1 = getProps(element); | ||
result2 = getProps(element); | ||
}, returnsNormally); | ||
expect(result1, containsPair('dartProp', 'dart')); | ||
expect(result2, containsPair('dartProp', 'dart')); | ||
}); | ||
}); | ||
} | ||
|
||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These comments were outdated, so I cleaned them up