Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(631)

Unified Diff: pkg/observe/test/observe_test.dart

Issue 26734004: use symbol literals instead of const ctor in packages (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/observe/test/observable_map_test.dart ('k') | pkg/observe/test/path_observer_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/observe/test/observe_test.dart
diff --git a/pkg/observe/test/observe_test.dart b/pkg/observe/test/observe_test.dart
index da58c3b522cde9f0b596d11e10ceb397bbcc6dbf..7b283a3c959d7b7de896157dbe95c47ecf4be482 100644
--- a/pkg/observe/test/observe_test.dart
+++ b/pkg/observe/test/observe_test.dart
@@ -12,8 +12,6 @@ import 'observe_test_utils.dart';
// Note: this ensures we run the dartanalyzer on the @observe package.
// @static-clean
-const _VALUE = const Symbol('value');
-
void main() {
// Note: to test the basic Observable system, we use ObservableBox due to its
// simplicity. We also test a variant that is based on dirty-checking.
@@ -214,7 +212,7 @@ void _observeTests(createModel(x)) {
// Verify that mutation operations on the list fail:
expect(() {
- records[0] = new PropertyChangeRecord(_VALUE);
+ records[0] = new PropertyChangeRecord(#value);
}, throwsUnsupportedError);
expect(() { records.clear(); }, throwsUnsupportedError);
@@ -226,7 +224,7 @@ void _observeTests(createModel(x)) {
var t = createModel(123);
var records = [];
subs.add(t.changes.listen((r) { records.addAll(r); }));
- t.notifyChange(new PropertyChangeRecord(_VALUE));
+ t.notifyChange(new PropertyChangeRecord(#value));
performMicrotaskCheckpoint();
expectChanges(records, _changedValue(1));
@@ -237,7 +235,7 @@ void _observeTests(createModel(x)) {
var t = createModel(123);
var records = null;
subs.add(t.changes.listen((r) { records = r; }));
- expect(t.notifyPropertyChange(_VALUE, t.value, 42), 42,
+ expect(t.notifyPropertyChange(#value, t.value, 42), 42,
reason: 'notifyPropertyChange returns newValue');
performMicrotaskCheckpoint();
@@ -246,7 +244,7 @@ void _observeTests(createModel(x)) {
});
}
-_changedValue(len) => new List.filled(len, new PropertyChangeRecord(_VALUE));
+_changedValue(len) => new List.filled(len, new PropertyChangeRecord(#value));
// A test model based on dirty checking.
class WatcherModel<T> extends ObservableBase {
« no previous file with comments | « pkg/observe/test/observable_map_test.dart ('k') | pkg/observe/test/path_observer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698