From c86758849a80ea7f04b2d969aa0c9d2d5cc55d48 Mon Sep 17 00:00:00 2001 From: Guillaume Lessard Date: Thu, 7 Mar 2024 16:53:49 -0800 Subject: [PATCH] Test SystemString.string property consistency --- Tests/SystemTests/SystemStringTests.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Tests/SystemTests/SystemStringTests.swift b/Tests/SystemTests/SystemStringTests.swift index a189171..c929171 100644 --- a/Tests/SystemTests/SystemStringTests.swift +++ b/Tests/SystemTests/SystemStringTests.swift @@ -254,6 +254,11 @@ final class SystemStringTest: XCTestCase { XCTAssert(str == "abcd") } + func testStringProperty() { + let source: [CInterop.PlatformChar] = [0x61, 0x62, 0, 0x63] + let str = SystemString(platformString: source) + XCTAssertEqual(str.string, str[...].string) + } } extension SystemStringTest {