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

Unified Diff: test_sources/non_transformed/web/generated_code_test.dart

Issue 615913004: Add @jsify annotation. Support automatically proxying Lists and Maps to Dart in Proxies. Support co… (Closed) Base URL: https://github.com/dart-lang/js-interop.git@master
Patch Set: Created 6 years, 3 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: test_sources/non_transformed/web/generated_code_test.dart
diff --git a/test_sources/non_transformed/web/generated_code_test.dart b/test_sources/non_transformed/web/generated_code_test.dart
index 59da35104c80a1906fdf09b6fc0b8cf8838418a6..6786953b7fd4e4d48ecfe854bef514bb0db6e997 100644
--- a/test_sources/non_transformed/web/generated_code_test.dart
+++ b/test_sources/non_transformed/web/generated_code_test.dart
@@ -116,6 +116,30 @@ main() {
expect(foo.bar, bar);
});
+ test('should return Lists', () {
+ var library2 = new l2.Library2();
+ var l = library2.createList('1', 'b', 'z');
+ expect(l, ['1', 'b', 'z']);
+ });
+
+ test('should accept Lists', () {
+ var library2 = new l2.Library2();
+ var s = library2.joinList(['1', 'b', 'z']);
+ expect(s, '1, b, z');
+ });
+
+ test('should return Maps', () {
+ var library2 = new l2.Library2();
+ var l = library2.createMap('a', 1, 'z', 26);
+ expect(l, {'a': 1, 'z': 26});
+ });
+
+ test('should accept Maps', () {
+ var library2 = new l2.Library2();
+ var s = library2.joinMap({'a': 1, 'z': 26});
+ expect(s, 'a: 1, z: 26');
+ });
+
test('should accept exported object as arguments', () {
var foo = new t.JsFoo('red');
var bar = new t.ExportMe.named('blue');
« lib/src/transformer/js_proxy_generator.dart ('K') | « test_sources/non_transformed/lib/library2.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698