summaryrefslogtreecommitdiff
path: root/buffer_test.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-11-07 14:17:36 -0500
committerRyan Dahl <ry@tinyclouds.org>2018-11-07 14:17:36 -0500
commit280856f8d81c4b2e53fa8022aafae5a7c008747f (patch)
tree07dd6f1acd98046c076a767b5105f91ea13d6d25 /buffer_test.ts
parent8610e3578c923be2b7d758e75ea370801abf8574 (diff)
First pass at bufio.read tests.
Original: https://github.com/denoland/deno_std/commit/1eb57aa3948caf88e9064defc15e076b8a46fbd2
Diffstat (limited to 'buffer_test.ts')
-rw-r--r--buffer_test.ts10
1 files changed, 7 insertions, 3 deletions
diff --git a/buffer_test.ts b/buffer_test.ts
index c614b2e03..8365b29bd 100644
--- a/buffer_test.ts
+++ b/buffer_test.ts
@@ -1,8 +1,12 @@
// This code has been ported almost directly from Go's src/bytes/buffer_test.go
// Copyright 2009 The Go Authors. All rights reserved. BSD license.
// https://github.com/golang/go/blob/master/LICENSE
-import { test, assert, assertEqual } from "./test_util.ts";
-import { Buffer } from "deno";
+import {
+ test,
+ assert,
+ assertEqual
+} from "http://deno.land/x/testing/testing.ts";
+import { Buffer } from "./buffer.ts";
// N controls how many iterations of certain checks are performed.
const N = 100;
@@ -13,7 +17,7 @@ function init() {
if (testBytes == null) {
testBytes = new Uint8Array(N);
for (let i = 0; i < N; i++) {
- testBytes[i] = "a".charCodeAt(0) + (i % 26);
+ testBytes[i] = "a".charCodeAt(0) + i % 26;
}
const decoder = new TextDecoder();
testString = decoder.decode(testBytes);