OLD | NEW |
1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 "package:expect/expect.dart"; | 6 import "package:expect/expect.dart"; |
7 | 7 |
8 main() { | 8 main() { |
9 Foreign memory = new ForeignMemory.allocated(8); | 9 Foreign memory = new ForeignMemory.allocated(8); |
10 var bigint = 9223372036854775806; | 10 var bigint = 9223372036854775806; |
11 memory.setInt64(0, bigint); | 11 memory.setInt64(0, bigint); |
12 Expect.equals(memory.getInt64(0), bigint); | 12 Expect.equals(memory.getInt64(0), bigint); |
13 memory.setUint64(0, bigint); | 13 memory.setUint64(0, bigint); |
14 Expect.equals(memory.getUint64(0), bigint); | 14 Expect.equals(memory.getUint64(0), bigint); |
15 memory.free(); | 15 memory.free(); |
16 } | 16 } |
OLD | NEW |