mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 08:15:30 +03:00
Update gtest to newer version (#12871)
Update gtest Copy of debian/stable libgtest-dev Co-authored-by: Petr Ledvina <ledvinap@hp124.ekotip.cz>
This commit is contained in:
parent
46ebf1fc97
commit
ee35b6afe3
37 changed files with 24193 additions and 28136 deletions
|
@ -27,12 +27,39 @@
|
|||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#if defined(GTEST_OS_ESP8266) || defined(GTEST_OS_ESP32)
|
||||
// Arduino-like platforms: program entry points are setup/loop instead of main.
|
||||
|
||||
#ifdef GTEST_OS_ESP8266
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void setup() { testing::InitGoogleTest(); }
|
||||
|
||||
void loop() { RUN_ALL_TESTS(); }
|
||||
|
||||
#ifdef GTEST_OS_ESP8266
|
||||
}
|
||||
#endif
|
||||
|
||||
#elif defined(GTEST_OS_QURT)
|
||||
// QuRT: program entry point is main, but argc/argv are unusable.
|
||||
|
||||
GTEST_API_ int main() {
|
||||
printf("Running main() from %s\n", __FILE__);
|
||||
testing::InitGoogleTest();
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
#else
|
||||
// Normal platforms: program entry point is main, argc/argv are initialized.
|
||||
|
||||
GTEST_API_ int main(int argc, char **argv) {
|
||||
printf("Running main() from gtest_main.cc\n");
|
||||
printf("Running main() from %s\n", __FILE__);
|
||||
testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue