mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
Use something really explicit to test "move semantics" on builds without
r-value references. I still want to test that when we have them, llvm_move is actually a move. Have I mentioned that I really want to move to C++11? ;] llvm-svn: 194318
This commit is contained in:
parent
2d15bb84b6
commit
d01da74a3a
@ -57,6 +57,10 @@ TEST(polymorphic_ptr_test, Basic) {
|
||||
EXPECT_EQ(42, p->x);
|
||||
|
||||
polymorphic_ptr<S> p2((llvm_move(p)));
|
||||
#if !LLVM_HAS_RVALUE_REFERENCES
|
||||
// 'p' may not have been moved from in C++98, fake it for the test.
|
||||
p2 = p.take();
|
||||
#endif
|
||||
EXPECT_FALSE((bool)p);
|
||||
EXPECT_TRUE(!p);
|
||||
EXPECT_TRUE((bool)p2);
|
||||
|
Loading…
Reference in New Issue
Block a user