From 9972a5269f87618e237cd927b859636322596a76 Mon Sep 17 00:00:00 2001 From: aidanfnv Date: Mon, 7 Apr 2025 07:01:50 -0700 Subject: Return non-escaped strings from user-defined attributes (#6735) Fixes #6624 This commit changes the behavior of getArgumentValueString() to return the string's value, instead of returning the string's token, as that token also contains the surrounding quotation marks. This commit also modifies the relevant unit test accordingly, to not check for the surrounding quotations. --- tools/slang-unit-test/unit-test-attribute-reflection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/slang-unit-test/unit-test-attribute-reflection.cpp') diff --git a/tools/slang-unit-test/unit-test-attribute-reflection.cpp b/tools/slang-unit-test/unit-test-attribute-reflection.cpp index 7a4758677..d0ef59f9e 100644 --- a/tools/slang-unit-test/unit-test-attribute-reflection.cpp +++ b/tools/slang-unit-test/unit-test-attribute-reflection.cpp @@ -66,7 +66,7 @@ SLANG_UNIT_TEST(attributeReflection) size_t size = 0; auto guid = comAttribute->getArgumentValueString(0, &size); UnownedStringSlice stringSlice = UnownedStringSlice(guid, size); - SLANG_CHECK(stringSlice == "\"042BE50B-CB01-4DBB-8367-3A9CDCBE2F49\""); + SLANG_CHECK(stringSlice == "042BE50B-CB01-4DBB-8367-3A9CDCBE2F49"); auto testType = reflection->findTypeByName("TS"); SLANG_CHECK(testType != nullptr); -- cgit v1.2.3