diff options
author | Yuchen Wu <yuchenericwu@hotmail.com> | 2013-11-12 05:57:06 +0000 |
---|---|---|
committer | Yuchen Wu <yuchenericwu@hotmail.com> | 2013-11-12 05:57:06 +0000 |
commit | b9a29f2782313ef6b73c772f0095c1f6e1f8b2c8 (patch) | |
tree | d2f39d6e002b7a0d6316e7502269d89bb5075c14 /llvm/test/tools/llvm-cov/Inputs/test.cpp | |
parent | 062f24c9738da24ad33982a0aa038ae87f5ce6a0 (diff) | |
download | bcm5719-llvm-b9a29f2782313ef6b73c772f0095c1f6e1f8b2c8.tar.gz bcm5719-llvm-b9a29f2782313ef6b73c772f0095c1f6e1f8b2c8.zip |
Revert "Added basic unit test for llvm-cov."
This reverts commit r194451.
Not sure why the tests are failing on the buildbot. They run fine on my
local machine. Could it possibly be because of the endianness of the
architectures? The GCNO and GCDA files are little-endian encoded, and
llvm-cov expects it to remain that way. Is this a safe assumption?
llvm-svn: 194454
Diffstat (limited to 'llvm/test/tools/llvm-cov/Inputs/test.cpp')
-rw-r--r-- | llvm/test/tools/llvm-cov/Inputs/test.cpp | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/llvm/test/tools/llvm-cov/Inputs/test.cpp b/llvm/test/tools/llvm-cov/Inputs/test.cpp deleted file mode 100644 index 07bc3f294c5..00000000000 --- a/llvm/test/tools/llvm-cov/Inputs/test.cpp +++ /dev/null @@ -1,77 +0,0 @@ -#include <cstdlib> - -bool on = false; -int len = 42; -double grid[10][10] = {0}; -const char * hello = "world"; -const char * world = "hello"; - -struct A { - virtual void B(); -}; - -void A::B() {} - -void useless() {} - -double more_useless() { - return 0; -} - -int foo() { - on = true; - return 3; -} - -int bar() { - len--; - return foo() + 45; -} - -void assign(int ii, int jj) { - grid[ii][jj] = (ii+1) * (jj+1); -} - -void initialize_grid() { - for (int ii = 0; ii < 2; ii++) - for (int jj = 0; jj < 2; jj++) - assign(ii, jj); -} - -int main() { - initialize_grid(); - - int a = 2; - on = rand() % 2; - if (on) { - foo(); - ++a; - } else { - bar(); - a += rand(); - } - - for (int ii = 0; ii < 10; ++ii) { - switch (rand() % 5) { - case 0: - a += rand(); - break; - case 1: - case 2: - a += rand() / rand(); - break; - case 3: - a -= rand(); - break; - default: - a = -1; - } - } - - A thing; - for (uint64_t ii = 0; ii < 4294967296; ++ii) - thing.B(); - - return a + 8 + grid[2][3] + len; - return more_useless(); -} |