OLD | NEW |
1 // Copyright (c) 2014, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 import 'dart:fletch.ffi'; | 5 import 'dart:dartino.ffi'; |
6 import 'dart:fletch'; | 6 import 'dart:dartino'; |
7 import "package:expect/expect.dart"; | 7 import "package:expect/expect.dart"; |
8 import "package:isolate/isolate.dart"; | 8 import "package:isolate/isolate.dart"; |
9 | 9 |
10 bool isRangeError(e) => e is RangeError; | 10 bool isRangeError(e) => e is RangeError; |
11 bool isArgumentError(e) => e is ArgumentError; | 11 bool isArgumentError(e) => e is ArgumentError; |
12 | 12 |
13 var freeFunc = ForeignLibrary.main.lookup('free'); | 13 var freeFunc = ForeignLibrary.main.lookup('free'); |
14 | 14 |
15 main() { | 15 main() { |
16 // Not finalized, not immutable. | 16 // Not finalized, not immutable. |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 Expect.equals(42, struct.getWord(struct.wordSize ~/ 2)); | 606 Expect.equals(42, struct.getWord(struct.wordSize ~/ 2)); |
607 struct64.setWord(4, 42); | 607 struct64.setWord(4, 42); |
608 Expect.equals(42, struct64.getWord(4)); | 608 Expect.equals(42, struct64.getWord(4)); |
609 struct32.setWord(2, 42); | 609 struct32.setWord(2, 42); |
610 Expect.equals(42, struct32.getWord(2)); | 610 Expect.equals(42, struct32.getWord(2)); |
611 | 611 |
612 struct.free(); | 612 struct.free(); |
613 struct64.free(); | 613 struct64.free(); |
614 struct32.free(); | 614 struct32.free(); |
615 } | 615 } |
OLD | NEW |