(self, count, binary)
| 105 | print(self.EmitTestBody()) |
| 106 | |
| 107 | def RunTest(self, count, binary): |
| 108 | try: |
| 109 | fd, path = tempfile.mkstemp(suffix=".js", prefix="bigint-test-") |
| 110 | with open(path, "w") as f: |
| 111 | f.write(self.EmitData(count)) |
| 112 | f.write(self.EmitTestBody()) |
| 113 | return subprocess.call("%s %s" % (binary, path), |
| 114 | shell=True) |
| 115 | finally: |
| 116 | os.close(fd) |
| 117 | os.remove(path) |
| 118 | |
| 119 | class UnaryOp(TestGenerator): |
| 120 | # Subclasses must implement these two. |