diff options
| author | aidanfnv <aidanf@nvidia.com> | 2025-04-07 07:01:50 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-07 14:01:50 +0000 |
| commit | 9972a5269f87618e237cd927b859636322596a76 (patch) | |
| tree | 0cde247d105eb170989f1d3517029859aaab3039 /tools | |
| parent | edb7289383538c3356ca2d5f7c37f41821bbf252 (diff) | |
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.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/slang-unit-test/unit-test-attribute-reflection.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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); |
