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.
This commit is contained in:
Liam 2018-12-10 20:15:01 +00:00
parent de879a2dc2
commit 343428c4e0

View File

@ -92,7 +92,7 @@ class LengthFieldPrependerTest: XCTestCase {
if case .some(.byteBuffer(var outputBuffer)) = self.channel.readOutbound() { 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) XCTAssertEqual(standardDataString, bodyString)
let additionalData = outputBuffer.readBytes(length: 1) let additionalData = outputBuffer.readBytes(length: 1)