Update json/json_test to new parameter format.
Review URL: https://codereview.chromium.org//26652003 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28513 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
@@ -139,8 +139,9 @@ main() {
|
||||
|
||||
test('stringify custom converter', () {
|
||||
List l = [const C(0), const C(1)];
|
||||
expect(JSON.encode(l, (x) => "C(${x.id})"), equals("[C(0),C(1)]"));
|
||||
expect(JSON.encode(l), equals("[C/0,C/1]"));
|
||||
expect(JSON.encode(l, toEncodable: (x) => "C(${x.id})"),
|
||||
equals('["C(0)","C(1)"]'));
|
||||
expect(JSON.encode(l), equals('["C/0","C/1"]'));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user