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

Unified Diff: test/map_test.dart

Issue 1192943003: changes for 0.3.9 (Closed) Base URL: https://github.com/dart-lang/dart-protoc-plugin.git@master
Patch Set: made mixins more general Created 5 years, 6 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/map_test.dart
diff --git a/test/map_test.dart b/test/map_test.dart
index 14036a04f2678ad4c923585aa192d06fd9a7b714..beff1fc1932a8977d3afe9c8d16f9bcf7fe6e743 100644
--- a/test/map_test.dart
+++ b/test/map_test.dart
@@ -54,17 +54,6 @@ void main() {
expect(rec["msg"], same(msg));
});
- test('operator [] handles dotted paths', () {
- var rec = new pb.Rec();
- rec.msg = new pb.NonMap();
- rec.msg.str = "hello";
- expect(rec["msg.str"], "hello");
-
- rec.msg.child = new pb.NonMap();
- rec.msg.child.str = "child";
- expect(rec["msg.child.str"], "child");
- });
-
test('operator []= throws exception for invalid key', () {
var rec = new pb.Rec();
expect(() { rec["unknown"] = 123; },
@@ -91,26 +80,6 @@ void main() {
expect(rec.str, "hello");
});
- test('operator []= handles dotted paths', () {
- var rec = new pb.Rec();
- rec.msg = new pb.NonMap();
- rec["msg.str"] = "hello";
- expect(rec.msg.str, "hello");
-
- rec.msg.child = new pb.NonMap();
- rec["msg.child.str"] = "child";
- expect(rec.msg.child.str, "child");
- });
-
- test('operator []= throws exception for invalid dotted path', () {
- var rec = new pb.Rec();
- rec.msg = new pb.NonMap();
- expect(() { rec["msg.unknown"] = "hello"; },
- throwsError(ArgumentError, "field 'unknown' not found in NonMap"));
- expect(() { rec["msg.unknown.child"] = "hello"; },
- throwsError(ArgumentError, "field 'unknown' not found in NonMap"));
- });
-
test('keys returns each field name (even when unset)', () {
var rec = new pb.Rec();
expect(new Set.from(rec.keys), new Set.from(["msg", "num", "nums", "str"]));
« lib/file_generator.dart ('K') | « pubspec.yaml ('k') | test/message_generator_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698