From 9ab0f07b2d49cfe4b6af0dcc1665ab3bfeb50d22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Mon, 19 Dec 2016 21:57:52 +0100 Subject: [PATCH] Fix compile error in file test. --- tests/vibe.core.file.d | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/vibe.core.file.d b/tests/vibe.core.file.d index db48d09..2f212cf 100644 --- a/tests/vibe.core.file.d +++ b/tests/vibe.core.file.d @@ -6,21 +6,23 @@ module test; import vibe.core.file; +enum ubyte[] bytes(BYTES...) = [BYTES]; + void main() { auto f = openFile("test.dat", FileMode.createTrunc); assert(f.size == 0); - f.write([1, 2, 3, 4, 5]); + f.write(bytes!(1, 2, 3, 4, 5)); assert(f.size == 5); f.seek(0); - f.write([1, 2, 3, 4, 5]); + f.write(bytes!(1, 2, 3, 4, 5)); assert(f.size == 5); - f.write([6, 7, 8, 9, 10]); + f.write(bytes!(6, 7, 8, 9, 10)); assert(f.size == 10); ubyte[5] dst; f.seek(2); f.read(dst); - assert(dst[] == [3, 4, 5, 6, 7]); + assert(dst[] == bytes!(3, 4, 5, 6, 7)); f.close(); removeFile("test.dat");