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

Unified Diff: pkg/polymer_expressions/test/eval_test.dart

Issue 25967002: fix list filtering if the filter is a method (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/polymer_expressions/lib/eval.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer_expressions/test/eval_test.dart
diff --git a/pkg/polymer_expressions/test/eval_test.dart b/pkg/polymer_expressions/test/eval_test.dart
index 0ed74565d4ecf7f8f9e4ef1d30fd58a5d110d7bc..c5f400430cbb10df25b67e1798a06dd36c6a9b28 100644
--- a/pkg/polymer_expressions/test/eval_test.dart
+++ b/pkg/polymer_expressions/test/eval_test.dart
@@ -153,6 +153,10 @@ main() {
expectEval('a | parseInt() | add(10)', 52, null, topLevel);
});
+ test('should filter a list', () {
+ expectEval('chars1 | filteredList', ['a', 'b'], new WordElement());
+ });
+
test('should return null if the receiver of a method is null', () {
expectEval('a.b', null, null, {'a': null});
expectEval('a.b()', null, null, {'a': null});
@@ -387,3 +391,9 @@ expectObserve(String s, {
expect(passed, true, reason: "Didn't receive a change notification on $s");
})]);
}
+
+// Regression test from https://code.google.com/p/dart/issues/detail?id=13459
+class WordElement extends ObservableBase {
+ @observable List chars1 = 'abcdefg'.split('');
+ List filteredList(List original) => [original[0], original[1]];
+}
« no previous file with comments | « pkg/polymer_expressions/lib/eval.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698