]>
git.proxmox.com Git - rustc.git/blob - src/compiler-rt/lib/tsan/tests/unit/tsan_vector_test.cc
1 //===-- tsan_vector_test.cc -----------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file is a part of ThreadSanitizer (TSan), a race detector.
12 //===----------------------------------------------------------------------===//
13 #include "tsan_vector.h"
15 #include "gtest/gtest.h"
20 Vector
<int> v(MBlockScopedBuf
);
21 EXPECT_EQ(v
.Size(), (uptr
)0);
23 EXPECT_EQ(v
.Size(), (uptr
)1);
26 EXPECT_EQ(v
.Size(), (uptr
)2);
31 TEST(Vector
, Stride
) {
32 Vector
<int> v(MBlockScopedBuf
);
33 for (int i
= 0; i
< 1000; i
++) {
35 EXPECT_EQ(v
.Size(), (uptr
)(i
+ 1));
38 for (int i
= 0; i
< 1000; i
++) {