summaryrefslogtreecommitdiffstats
path: root/llvm/unittests
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2012-12-05 22:43:07 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2012-12-05 22:43:07 +0000
commit4b11df0d0b9ca90c3afa16914cff2adacbf68e25 (patch)
tree0ab91ac782e95a26dab9ed1814f416b571d8cd9a /llvm/unittests
parent6fa518c51ef5a3d982abda86286eaf00c74a549a (diff)
downloadbcm5719-llvm-4b11df0d0b9ca90c3afa16914cff2adacbf68e25.tar.gz
bcm5719-llvm-4b11df0d0b9ca90c3afa16914cff2adacbf68e25.zip
Do not run tests MappedMemoryTest.BasicWrite and MultipleWrite unless both
MF_READ and MF_WRITE are set. llvm-svn: 169439
Diffstat (limited to 'llvm/unittests')
-rw-r--r--llvm/unittests/Support/MemoryTest.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/unittests/Support/MemoryTest.cpp b/llvm/unittests/Support/MemoryTest.cpp
index f4e4f157854..4164713fcb3 100644
--- a/llvm/unittests/Support/MemoryTest.cpp
+++ b/llvm/unittests/Support/MemoryTest.cpp
@@ -98,8 +98,9 @@ TEST_P(MappedMemoryTest, MultipleAllocAndRelease) {
}
TEST_P(MappedMemoryTest, BasicWrite) {
- // This test applies only to writeable combinations
- if (Flags && !(Flags & Memory::MF_WRITE))
+ // This test applies only to readable and writeable combinations
+ if (Flags &&
+ !((Flags & Memory::MF_READ) && (Flags & Memory::MF_WRITE)))
return;
error_code EC;
@@ -117,8 +118,9 @@ TEST_P(MappedMemoryTest, BasicWrite) {
}
TEST_P(MappedMemoryTest, MultipleWrite) {
- // This test applies only to writeable combinations
- if (Flags && !(Flags & Memory::MF_WRITE))
+ // This test applies only to readable and writeable combinations
+ if (Flags &&
+ !((Flags & Memory::MF_READ) && (Flags & Memory::MF_WRITE)))
return;
error_code EC;
MemoryBlock M1 = Memory::allocateMappedMemory(sizeof(int), 0, Flags, EC);
OpenPOWER on IntegriCloud