chore: bump dart sdk to 3.8 (#20355)
* chore: bump dart sdk to 3.8 * chore: make build * make pigeon * chore: format files --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
@@ -7,33 +7,13 @@ void main() {
|
||||
AsyncMutex lock = AsyncMutex();
|
||||
List<int> events = [];
|
||||
expect(0, lock.enqueued);
|
||||
lock.run(
|
||||
() => Future.delayed(
|
||||
const Duration(milliseconds: 10),
|
||||
() => events.add(1),
|
||||
),
|
||||
);
|
||||
lock.run(() => Future.delayed(const Duration(milliseconds: 10), () => events.add(1)));
|
||||
expect(1, lock.enqueued);
|
||||
lock.run(
|
||||
() => Future.delayed(
|
||||
const Duration(milliseconds: 3),
|
||||
() => events.add(2),
|
||||
),
|
||||
);
|
||||
lock.run(() => Future.delayed(const Duration(milliseconds: 3), () => events.add(2)));
|
||||
expect(2, lock.enqueued);
|
||||
lock.run(
|
||||
() => Future.delayed(
|
||||
const Duration(milliseconds: 1),
|
||||
() => events.add(3),
|
||||
),
|
||||
);
|
||||
lock.run(() => Future.delayed(const Duration(milliseconds: 1), () => events.add(3)));
|
||||
expect(3, lock.enqueued);
|
||||
await lock.run(
|
||||
() => Future.delayed(
|
||||
const Duration(milliseconds: 10),
|
||||
() => events.add(4),
|
||||
),
|
||||
);
|
||||
await lock.run(() => Future.delayed(const Duration(milliseconds: 10), () => events.add(4)));
|
||||
expect(0, lock.enqueued);
|
||||
expect(events, [1, 2, 3, 4]);
|
||||
});
|
||||
|
||||
@@ -9,22 +9,12 @@ void main() {
|
||||
final dateTimeString = DateFormat.yMMMMd().format(dateTime);
|
||||
|
||||
test('returns description if it has one', () {
|
||||
final result = getAltText(
|
||||
const ExifInfo(description: 'description'),
|
||||
dateTime,
|
||||
AssetType.image,
|
||||
[],
|
||||
);
|
||||
final result = getAltText(const ExifInfo(description: 'description'), dateTime, AssetType.image, []);
|
||||
expect(result, 'description');
|
||||
});
|
||||
|
||||
test('returns image alt text with date if no location', () {
|
||||
final (template, args) = getAltTextTemplate(
|
||||
const ExifInfo(),
|
||||
dateTime,
|
||||
AssetType.image,
|
||||
[],
|
||||
);
|
||||
final (template, args) = getAltTextTemplate(const ExifInfo(), dateTime, AssetType.image, []);
|
||||
expect(template, "image_alt_text_date");
|
||||
expect(args["isVideo"], "false");
|
||||
expect(args["date"], dateTimeString);
|
||||
@@ -45,12 +35,7 @@ void main() {
|
||||
});
|
||||
|
||||
test('returns image alt text with date and some people', () {
|
||||
final (template, args) = getAltTextTemplate(
|
||||
const ExifInfo(),
|
||||
dateTime,
|
||||
AssetType.image,
|
||||
["Alice", "Bob"],
|
||||
);
|
||||
final (template, args) = getAltTextTemplate(const ExifInfo(), dateTime, AssetType.image, ["Alice", "Bob"]);
|
||||
expect(template, "image_alt_text_date_2_people");
|
||||
expect(args["isVideo"], "false");
|
||||
expect(args["date"], dateTimeString);
|
||||
|
||||
@@ -6,10 +6,7 @@ void main() {
|
||||
String? result;
|
||||
|
||||
result = getVersionCompatibilityMessage(1, 0, 2, 0);
|
||||
expect(
|
||||
result,
|
||||
'Your app major version is not compatible with the server!',
|
||||
);
|
||||
expect(result, 'Your app major version is not compatible with the server!');
|
||||
|
||||
result = getVersionCompatibilityMessage(1, 106, 1, 105);
|
||||
expect(
|
||||
|
||||
Reference in New Issue
Block a user