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

Unified Diff: samples/tests/samples/lib/observable/observable_value_tests.dart

Issue 23717003: Reorganize tests for samples so the test is discoverable from the sample (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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
Index: samples/tests/samples/lib/observable/observable_value_tests.dart
diff --git a/samples/tests/samples/lib/observable/observable_value_tests.dart b/samples/tests/samples/lib/observable/observable_value_tests.dart
deleted file mode 100644
index fbeeb46137e28642afaa40b9037a5d50dd066b5a..0000000000000000000000000000000000000000
--- a/samples/tests/samples/lib/observable/observable_value_tests.dart
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of observable_tests;
-
-testObservableValue() {
- test('ObservableValue', () {
- final value = new ObservableValue<String>('initial');
- expect(value.value, equals('initial'));
-
- // Set value.
- value.value = 'new';
- expect(value.value, equals('new'));
-
- // Change event is sent when value is changed.
- EventSummary result = null;
- value.addChangeListener((summary) {
- expect(result, isNull);
- result = summary;
- expect(result, isNotNull);
- });
-
- value.value = 'newer';
-
- expect(result, isNotNull);
- expect(result.events.length, equals(1));
- validateUpdate(result.events[0], value, 'value', null, 'newer', 'new');
- });
-
- test('does not raise event if unchanged', () {
- final value = new ObservableValue<String>('foo');
- expect(value.value, equals('foo'));
-
- bool called = false;
- value.addChangeListener((summary) { called = true; });
-
- // Set it to the same value.
- value.value = 'foo';
-
- // Should not have gotten an event.
- expect(called, isFalse);
- });
-}

Powered by Google App Engine
This is Rietveld 408576698