From 343428c4e0453192459207a21c75782e36a40457 Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 10 Dec 2018 20:15:01 +0000 Subject: [PATCH] Change to units tests for LengthFieldPrepender class to make it work with utf8 strings. Motivation: To ensure that non ascii strings work in the test. Modifications: One more change to standardDataStringCount forgotten in the last commit. Result: Non ascii strings work. --- Tests/NIOExtrasTests/LengthFieldPrependerTest.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/NIOExtrasTests/LengthFieldPrependerTest.swift b/Tests/NIOExtrasTests/LengthFieldPrependerTest.swift index fa223c6..2abf7e9 100644 --- a/Tests/NIOExtrasTests/LengthFieldPrependerTest.swift +++ b/Tests/NIOExtrasTests/LengthFieldPrependerTest.swift @@ -92,7 +92,7 @@ class LengthFieldPrependerTest: XCTestCase { if case .some(.byteBuffer(var outputBuffer)) = self.channel.readOutbound() { - let bodyString = outputBuffer.readString(length: standardDataString.count) + let bodyString = outputBuffer.readString(length: standardDataStringCount) XCTAssertEqual(standardDataString, bodyString) let additionalData = outputBuffer.readBytes(length: 1)