| OLD | NEW |
| 1 // Copyright (c) 2016, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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:ffi/ffi.dart'; | 6 import 'package:ffi/ffi.dart'; |
| 7 import 'package:expect/expect.dart'; | 7 import 'package:expect/expect.dart'; |
| 8 | 8 |
| 9 import 'package:mbedtls/mbedtls.dart'; | 9 import 'package:mbedtls/mbedtls.dart'; |
| 10 import 'dart:math'; | 10 import 'dart:math'; |
| 11 | 11 |
| 12 const String serverPort = const String.fromEnvironment('SERVER_PORT'); | 12 const String serverPort = const String.fromEnvironment('SERVER_PORT'); |
| 13 | 13 |
| 14 void main() { | 14 void main() { |
| 15 var port = int.parse(serverPort); | 15 var port = int.parse(serverPort); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 38 var longData = ""; | 38 var longData = ""; |
| 39 for (int i = 0; i < 197; i++) longData = "$longData$data"; | 39 for (int i = 0; i < 197; i++) longData = "$longData$data"; |
| 40 Expect.equals(combined, longData); | 40 Expect.equals(combined, longData); |
| 41 socket.close(); | 41 socket.close(); |
| 42 } | 42 } |
| 43 | 43 |
| 44 String bufferToString(ForeignMemory buffer) { | 44 String bufferToString(ForeignMemory buffer) { |
| 45 return memoryToString(new ForeignPointer(buffer.address), buffer.length); | 45 return memoryToString(new ForeignPointer(buffer.address), buffer.length); |
| 46 } | 46 } |
| 47 | 47 |
| OLD | NEW |