From 280856f8d81c4b2e53fa8022aafae5a7c008747f Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 7 Nov 2018 14:17:36 -0500 Subject: First pass at bufio.read tests. Original: https://github.com/denoland/deno_std/commit/1eb57aa3948caf88e9064defc15e076b8a46fbd2 --- buffer_test.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'buffer_test.ts') 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); -- cgit v1.2.3