Skip to content

Bump the version of the Dart SDK mocked in most tests #3672

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

Merged
merged 1 commit into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions test/dartdoc_test_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@ abstract class DartdocTestBase {

String get linkPrefix => '$placeholder$libraryName';

String get dartCoreUrlPrefix =>
'https://api.dart.dev/stable/2.16.0/dart-core';
String get dartCoreUrlPrefix => 'https://api.dart.dev/stable/3.2.0/dart-core';

String get sdkConstraint => '>=2.15.0 <3.0.0';
String get sdkConstraint => '>=3.2.0 <4.0.0';

List<String> get experiments => [];

Expand Down
4 changes: 2 additions & 2 deletions test/element_type_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ void main() async {
const linkPrefix = '$placeholder$libraryName';

const intLink =
'<a href="https://api.dart.dev/stable/2.16.0/dart-core/int-class.html">int</a>';
'<a href="https://api.dart.dev/stable/3.2.0/dart-core/int-class.html">int</a>';
const stringLink =
'<a href="https://api.dart.dev/stable/2.16.0/dart-core/String-class.html">String</a>';
'<a href="https://api.dart.dev/stable/3.2.0/dart-core/String-class.html">String</a>';

final packageMetaProvider = testPackageMetaProvider;
final resourceProvider =
Expand Down
4 changes: 2 additions & 2 deletions test/enum_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ class C {}
expect(
cClass.documentationAsHtml,
'<p>Reference to '
'<a href="https://api.dart.dev/stable/2.16.0/dart-core/Enum/index.html">E.index</a>.</p>',
'<a href="https://api.dart.dev/stable/3.2.0/dart-core/Enum/index.html">E.index</a>.</p>',
);
}

Expand All @@ -528,7 +528,7 @@ class C {}
expect(eEnum.instanceFields.map((f) => f.name), contains('index'));
expect(
eEnum.instanceFields.named('index').linkedName,
'<a href="https://api.dart.dev/stable/2.16.0/dart-core/Enum/index.html">index</a>',
'<a href="https://api.dart.dev/stable/3.2.0/dart-core/Enum/index.html">index</a>',
);
}

Expand Down
6 changes: 3 additions & 3 deletions test/src/test_descriptor_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import 'package:yaml/yaml.dart' as yaml;

export 'package:test_descriptor/test_descriptor.dart';

String buildPubspecText({String sdkConstraint = '>=2.15.0 <3.0.0'}) => '''
String buildPubspecText({String sdkConstraint = '>=3.2.0 <4.0.0'}) => '''
name: test_package
version: 0.0.1
environment:
Expand Down Expand Up @@ -76,9 +76,9 @@ Future<String> createPackage(
"packages": [
$packagesInfo
],
"generated": "2021-09-14T20:36:04.604099Z",
"generated": "2024-02-14T20:36:04.604099Z",
"generator": "pub",
"generatorVersion": "2.14.1"
"generatorVersion": "3.2.0"
}
''')
],
Expand Down
2 changes: 1 addition & 1 deletion test/src/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ PackageMetaProvider get testPackageMetaProvider {
///
/// Included is a "version" file and an "api_readme.md" file.
void writeMockSdkFiles(Folder sdkFolder) {
sdkFolder.getChildAssumingFile('version').writeAsStringSync('2.16.0');
sdkFolder.getChildAssumingFile('version').writeAsStringSync('3.2.0');
sdkFolder.getChildAssumingFile('api_readme.md').writeAsStringSync(
'Welcome to the [Dart](https://dart.dev/) API reference documentation');

Expand Down