@@ -3,8 +3,7 @@ import 'package:clide/extension/extension.dart';
|
||||
import 'package:clide/kernel/kernel.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
CommandContribution _cmd(String name, Future<IpcResponse> Function() run) =>
|
||||
CommandContribution(
|
||||
CommandContribution _cmd(String name, Future<IpcResponse> Function() run) => CommandContribution(
|
||||
id: name,
|
||||
command: name,
|
||||
title: 'cmd $name',
|
||||
|
||||
@@ -172,12 +172,8 @@ void main() {
|
||||
test('emits ExtensionActivated / ExtensionDeactivated events', () async {
|
||||
final activated = <String>[];
|
||||
final deactivated = <String>[];
|
||||
final s1 = f.services.events
|
||||
.on<ExtensionActivated>()
|
||||
.listen((e) => activated.add(e.id));
|
||||
final s2 = f.services.events
|
||||
.on<ExtensionDeactivated>()
|
||||
.listen((e) => deactivated.add(e.id));
|
||||
final s1 = f.services.events.on<ExtensionActivated>().listen((e) => activated.add(e.id));
|
||||
final s2 = f.services.events.on<ExtensionDeactivated>().listen((e) => deactivated.add(e.id));
|
||||
f.services.extensions.register(_Ext(id: 'e'));
|
||||
await f.services.extensions.activateAll();
|
||||
await Future<void>.delayed(Duration.zero);
|
||||
|
||||
@@ -85,8 +85,7 @@ void main() {
|
||||
);
|
||||
});
|
||||
|
||||
test('falls through to default-locale when current locale is empty',
|
||||
() async {
|
||||
test('falls through to default-locale when current locale is empty', () async {
|
||||
final i = build(catalogs: {
|
||||
'builtin.x': {
|
||||
const Locale('en', 'US'): {
|
||||
@@ -143,8 +142,7 @@ void main() {
|
||||
expect(i.string('k', namespace: 'b', placeholder: '-'), 'B');
|
||||
});
|
||||
|
||||
test('setLocale refreshes cached namespaces and notifies listeners',
|
||||
() async {
|
||||
test('setLocale refreshes cached namespaces and notifies listeners', () async {
|
||||
final i = build(catalogs: {
|
||||
'x': {
|
||||
const Locale('en', 'US'): {
|
||||
|
||||
@@ -32,10 +32,7 @@ void main() {
|
||||
|
||||
test('honors initialName when present', () {
|
||||
final c = ThemeController(
|
||||
bundled: [
|
||||
_def('a', const Color(0xFF000000)),
|
||||
_def('b', const Color(0xFF999999))
|
||||
],
|
||||
bundled: [_def('a', const Color(0xFF000000)), _def('b', const Color(0xFF999999))],
|
||||
initialName: 'b',
|
||||
);
|
||||
expect(c.currentName, 'b');
|
||||
|
||||
@@ -35,8 +35,7 @@ semantic:
|
||||
mainchrome: red
|
||||
focus: "#123456"
|
||||
''');
|
||||
expect(
|
||||
def.semanticOverride!.lookup('mainchrome'), const Color(0xFFFF0000));
|
||||
expect(def.semanticOverride!.lookup('mainchrome'), const Color(0xFFFF0000));
|
||||
expect(def.semanticOverride!.lookup('focus'), const Color(0xFF123456));
|
||||
});
|
||||
|
||||
|
||||
@@ -126,8 +126,7 @@ void main() {
|
||||
'ext.sqlite.table.background': '#ABCDEF',
|
||||
},
|
||||
);
|
||||
expect(tokens.extensionTokens['ext.sqlite.table.background'],
|
||||
const Color(0xFFABCDEF));
|
||||
expect(tokens.extensionTokens['ext.sqlite.table.background'], const Color(0xFFABCDEF));
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user