[all-commits] [llvm/llvm-project] 56d319: [Support] Fix LEB128 test when building with MSVC ...
Alexandre Ganea via All-commits
all-commits at lists.llvm.org
Sat May 25 06:13:24 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 56d319e7e40ed7b07a8d02eb6f6e0dbb9392187d
https://github.com/llvm/llvm-project/commit/56d319e7e40ed7b07a8d02eb6f6e0dbb9392187d
Author: Alexandre Ganea <aganea at havenstudios.com>
Date: 2024-05-25 (Sat, 25 May 2024)
Changed paths:
M llvm/unittests/Support/LEB128Test.cpp
Log Message:
-----------
[Support] Fix LEB128 test when building with MSVC (#93184)
The VALUE expansion might be compiled in the different ways, because of
string pooling which isn't always enabled/guaranteed. When building with
MSVC, previously I was seeing for example empty strings `""` pointing to
different addresses, thus the negative offsets below in the log.
Previous test log:
```
Note: Google Test filter = LEB128Test.DecodeInvalidULEB128
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from LEB128Test
[ RUN ] LEB128Test.DecodeInvalidULEB128
C:\src\git\llvm-project\llvm\unittests\Support\LEB128Test.cpp(167): error: Expected equality of these values:
0u
Which is: 0
Value - reinterpret_cast<const uint8_t *>("")
Which is: -5
C:\src\git\llvm-project\llvm\unittests\Support\LEB128Test.cpp(168): error: Expected equality of these values:
1u
Which is: 1
Value - reinterpret_cast<const uint8_t *>("\x80")
Which is: -167
C:\src\git\llvm-project\llvm\unittests\Support\LEB128Test.cpp(171): error: Expected equality of these values:
9u
Which is: 9
Value - reinterpret_cast<const uint8_t *>("\x80\x80\x80\x80\x80\x80\x80\x80\x80\x02")
Which is: -167
C:\src\git\llvm-project\llvm\unittests\Support\LEB128Test.cpp(172): error: Expected equality of these values:
10u
Which is: 10
Value - reinterpret_cast<const uint8_t *>("\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x02")
Which is: -166
[ FAILED ] LEB128Test.DecodeInvalidULEB128 (2 ms)
[----------] 1 test from LEB128Test (2 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (4 ms total)
[ PASSED ] 0 tests.
[ FAILED ] 1 test, listed below:
[ FAILED ] LEB128Test.DecodeInvalidULEB128
1 FAILED TEST
```
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list