[compiler-rt] a37bd13 - [test][sanitizer] Fix test on windows
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 13 12:34:34 PDT 2023
Author: Vitaly Buka
Date: 2023-06-13T12:34:26-07:00
New Revision: a37bd137447b7af02d49fc66423846c3fc5c28bf
URL: https://github.com/llvm/llvm-project/commit/a37bd137447b7af02d49fc66423846c3fc5c28bf
DIFF: https://github.com/llvm/llvm-project/commit/a37bd137447b7af02d49fc66423846c3fc5c28bf.diff
LOG: [test][sanitizer] Fix test on windows
Added:
Modified:
compiler-rt/lib/sanitizer_common/tests/sanitizer_array_ref_test.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_array_ref_test.cpp b/compiler-rt/lib/sanitizer_common/tests/sanitizer_array_ref_test.cpp
index f6e816df2080a..12a83df455d39 100644
--- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_array_ref_test.cpp
+++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_array_ref_test.cpp
@@ -109,13 +109,6 @@ TEST(ArrayRefTest, ConstConvert) {
a = ArrayRef<int *>(ptrs);
}
-static std::vector<int> ReturnTest12() { return {1, 2}; }
-static void ArgTest12(ArrayRef<int> a) {
- EXPECT_EQ(2U, a.size());
- EXPECT_EQ(1, a[0]);
- EXPECT_EQ(2, a[1]);
-}
-
TEST(ArrayRefTest, ArrayRef) {
static const int kA1[] = {1, 2, 3, 4, 5, 6, 7, 8};
@@ -127,7 +120,7 @@ TEST(ArrayRefTest, ArrayRef) {
// A copy is expected for non-const ArrayRef (thin copy)
const ArrayRef<int> ar2(kA1);
- const ArrayRef<int> &ar2_ref = ArrayRef(ar2);
+ const ArrayRef<int> &ar2_ref = ArrayRef<int>(ar2);
EXPECT_NE(&ar2_ref, &ar2);
EXPECT_TRUE(ar2.equals(ar2_ref));
}
More information about the llvm-commits
mailing list