| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 final Expando<int> visits = const Expando<int>('visits'); | 5 const Expando<int> visits = const Expando<int>('visits'); |
| 6 | 6 |
| 7 main() { | 7 main() { |
| 8 var legal = [ new Object(), | 8 var legal = [ new Object(), |
| 9 new List(), [1,2,3], const [1,2,3], | 9 new List(), [1,2,3], const [1,2,3], |
| 10 new Map(), {'x':1,'y':2}, const {'x':1,'y':2}, | 10 new Map(), {'x':1,'y':2}, const {'x':1,'y':2}, |
| 11 new Expando(), new Expando('horse') ]; | 11 new Expando(), new Expando('horse') ]; |
| 12 for (var object in legal) { | 12 for (var object in legal) { |
| 13 testNamedExpando(object); | 13 testNamedExpando(object); |
| 14 testUnnamedExpando(object); | 14 testUnnamedExpando(object); |
| 15 testConstExpando(object); | 15 testConstExpando(object); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 => exception is IllegalArgumentException); | 101 => exception is IllegalArgumentException); |
| 102 Expect.throws(() => expando[42], (exception) | 102 Expect.throws(() => expando[42], (exception) |
| 103 => exception is IllegalArgumentException); | 103 => exception is IllegalArgumentException); |
| 104 Expect.throws(() => expando[42.87], (exception) | 104 Expect.throws(() => expando[42.87], (exception) |
| 105 => exception is IllegalArgumentException); | 105 => exception is IllegalArgumentException); |
| 106 Expect.throws(() => expando[true], (exception) | 106 Expect.throws(() => expando[true], (exception) |
| 107 => exception is IllegalArgumentException); | 107 => exception is IllegalArgumentException); |
| 108 Expect.throws(() => expando[false], (exception) | 108 Expect.throws(() => expando[false], (exception) |
| 109 => exception is IllegalArgumentException); | 109 => exception is IllegalArgumentException); |
| 110 } | 110 } |
| OLD | NEW |