| 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'; | 5 import 'dart:dartino'; |
| 6 | 6 |
| 7 import 'package:expect/expect.dart'; | 7 import 'package:expect/expect.dart'; |
| 8 import 'package:immutable/immutable.dart'; | 8 import 'package:immutable/immutable.dart'; |
| 9 | 9 |
| 10 const int INSERTS_PER_PROCESS = 1000; | 10 const int INSERTS_PER_PROCESS = 1000; |
| 11 const int NUM_PROCESSES = 500; | 11 const int NUM_PROCESSES = 500; |
| 12 | 12 |
| 13 // This function: | 13 // This function: |
| 14 // * inserts [INSERTS_PER_PROCESS/2] numbers into a tree | 14 // * inserts [INSERTS_PER_PROCESS/2] numbers into a tree |
| 15 // * sends the tree to a child process | 15 // * sends the tree to a child process |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 for (int i = 0; i < NUM_PROCESSES * INSERTS_PER_PROCESS; i++) { | 53 for (int i = 0; i < NUM_PROCESSES * INSERTS_PER_PROCESS; i++) { |
| 54 Expect.equals(i, modifiedTree.lookup(i)); | 54 Expect.equals(i, modifiedTree.lookup(i)); |
| 55 } | 55 } |
| 56 } | 56 } |
| 57 | 57 |
| 58 assertIsTree(value) { | 58 assertIsTree(value) { |
| 59 if (value is! RedBlackTree) { | 59 if (value is! RedBlackTree) { |
| 60 throw 'Expected to get a tree from child, but got exit message'; | 60 throw 'Expected to get a tree from child, but got exit message'; |
| 61 } | 61 } |
| 62 } | 62 } |
| OLD | NEW |