diff options
author | Thomas Lively <tlively@google.com> | 2023-07-06 15:08:12 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-06 19:08:12 +0000 |
commit | 195e18d0602108b18f305711f8ea1c902b729cb0 (patch) | |
tree | 578f1b0c26603c89f28fe99aa908d82c07863543 /test | |
parent | 20a543b73d302cf773961fef5d1c281844127140 (diff) | |
download | binaryen-195e18d0602108b18f305711f8ea1c902b729cb0.tar.gz binaryen-195e18d0602108b18f305711f8ea1c902b729cb0.tar.bz2 binaryen-195e18d0602108b18f305711f8ea1c902b729cb0.zip |
[NFC] Fix the use of "strict" in subtypes.h (#5804)
Previously we incorrectly used "strict" to mean the immediate subtypes of a
type, when in fact a strict subtype of a type is any subtype excluding the type
itself. Rename the incorrect `getStrictSubTypes` to `getImmediateSubTypes`,
rename the redundant `getAllStrictSubTypes` to `getStrictSubTypes`, and rename
the redundant `getAllSubTypes` to `getSubTypes`. Fixing the capitalization of
"SubType" to "Subtype" is left as future work.
Diffstat (limited to 'test')
-rw-r--r-- | test/gtest/type-builder.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/gtest/type-builder.cpp b/test/gtest/type-builder.cpp index 84b9f33c8..0744e2b5e 100644 --- a/test/gtest/type-builder.cpp +++ b/test/gtest/type-builder.cpp @@ -853,13 +853,13 @@ TEST_F(TypeTest, TestSubTypes) { {Type(built[0], Nullable), Type(built[1], Nullable)}, wasmBuilder.makeNop())); SubTypes subTypes(wasm); - auto subTypes0 = subTypes.getStrictSubTypes(built[0]); + auto subTypes0 = subTypes.getImmediateSubTypes(built[0]); EXPECT_TRUE(subTypes0.size() == 1 && subTypes0[0] == built[1]); - auto subTypes0Inclusive = subTypes.getAllSubTypes(built[0]); + auto subTypes0Inclusive = subTypes.getSubTypes(built[0]); EXPECT_TRUE(subTypes0Inclusive.size() == 2 && subTypes0Inclusive[0] == built[1] && subTypes0Inclusive[1] == built[0]); - auto subTypes1 = subTypes.getStrictSubTypes(built[1]); + auto subTypes1 = subTypes.getImmediateSubTypes(built[1]); EXPECT_EQ(subTypes1.size(), 0u); } |