[libc][NFC] add macro for fuchsia to switch test backend to zxtest
authorMichael Jones <michaelrj@google.com>
Tue, 12 Jan 2021 21:57:11 +0000 (21:57 +0000)
committerMichael Jones <michaelrj@google.com>
Wed, 13 Jan 2021 21:28:02 +0000 (21:28 +0000)
commit4cfccd51335139871cad03ac451a2d27ebfe7761
treeee8f93ee433fc7688b214bb4f1ccc06d903229df
parent18278ff1aac47d9bffa0231c74277ffc89def13e
[libc][NFC] add macro for fuchsia to switch test backend to zxtest

This moves utils/UnitTest/Test.[h/cpp] to LibcTest.[h/cpp] and adds a
new Test.h that acts as a switcher so that Fuchsia can use the zxtest
backend for running our tests as part of their build.

FuchsiaTest.h is for including fuchsia's zxtest library and anything
else needed to make the tests work under fuchsia (currently just
undefining the isascii macro for the test).

Downstream users, please fix your build instead of reverting.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D94625
libc/utils/UnitTest/CMakeLists.txt
libc/utils/UnitTest/FuchsiaTest.h [new file with mode: 0644]
libc/utils/UnitTest/LibcTest.cpp [moved from libc/utils/UnitTest/Test.cpp with 99% similarity]
libc/utils/UnitTest/LibcTest.h [new file with mode: 0644]
libc/utils/UnitTest/Test.h