mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 12:42:34 +01:00
Updated catch.
This commit is contained in:
1566
3rdparty/catch/catch.hpp
vendored
1566
3rdparty/catch/catch.hpp
vendored
File diff suppressed because it is too large
Load Diff
@@ -12,6 +12,7 @@
|
||||
#include <stdlib.h> // size_t
|
||||
#include <stddef.h> // ptrdiff_t
|
||||
|
||||
#include "platform.h"
|
||||
#include "config.h"
|
||||
#include "macros.h"
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#ifndef BX_CONFIG_H_HEADER_GUARD
|
||||
#define BX_CONFIG_H_HEADER_GUARD
|
||||
|
||||
#include "platform.h"
|
||||
#include "bx.h"
|
||||
|
||||
#ifndef BX_CONFIG_ALLOCATOR_DEBUG
|
||||
# define BX_CONFIG_ALLOCATOR_DEBUG 0
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#ifndef BX_ERROR_H_HEADER_GUARD
|
||||
#define BX_ERROR_H_HEADER_GUARD
|
||||
|
||||
#include "bx.h"
|
||||
#include "string.h"
|
||||
|
||||
#define BX_ERROR_SET(_ptr, _result, _msg) \
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#ifndef BX_OS_H_HEADER_GUARD
|
||||
#define BX_OS_H_HEADER_GUARD
|
||||
|
||||
#include "bx.h"
|
||||
#include "debug.h"
|
||||
|
||||
#if BX_PLATFORM_OSX
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#ifndef BX_READERWRITER_H_HEADER_GUARD
|
||||
#define BX_READERWRITER_H_HEADER_GUARD
|
||||
|
||||
#include "bx.h"
|
||||
#include "allocator.h"
|
||||
#include "error.h"
|
||||
#include "uint32_t.h"
|
||||
|
||||
@@ -6,11 +6,10 @@
|
||||
#ifndef BX_STRING_H_HEADER_GUARD
|
||||
#define BX_STRING_H_HEADER_GUARD
|
||||
|
||||
#include "bx.h"
|
||||
#include <wchar.h> // wchar_t
|
||||
|
||||
#include "allocator.h"
|
||||
|
||||
#include <wchar.h> // wchar_t
|
||||
|
||||
namespace bx
|
||||
{
|
||||
/// Non-zero-terminated string view.
|
||||
@@ -179,7 +178,7 @@ namespace bx
|
||||
// Finds identifier.
|
||||
const char* findIdentifierMatch(const char* _str, const char* _word);
|
||||
|
||||
// Finds any identifier from NULL terminated array of identifiers.
|
||||
/// Finds any identifier from NULL terminated array of identifiers.
|
||||
const char* findIdentifierMatch(const char* _str, const char* _words[]);
|
||||
|
||||
/// Cross platform implementation of vsnprintf that returns number of
|
||||
|
||||
@@ -3,16 +3,11 @@
|
||||
* License: https://github.com/bkaradzic/bx#license-bsd-2-clause
|
||||
*/
|
||||
|
||||
#define CATCH_CONFIG_RUNNER
|
||||
#include "test.h"
|
||||
|
||||
static const char* s_argv[] = { "bx.test" };
|
||||
|
||||
int runAllTests(int _argc, const char* _argv[])
|
||||
{
|
||||
DBG(BX_COMPILER_NAME " / " BX_CPU_NAME " / " BX_ARCH_NAME " / " BX_PLATFORM_NAME);
|
||||
return Catch::Session().run(_argc, _argv);
|
||||
}
|
||||
int runAllTests(int _argc, const char* _argv[]);
|
||||
|
||||
#if BX_PLATFORM_ANDROID
|
||||
# include <android/native_activity.h>
|
||||
|
||||
20
tests/run_test.cpp
Normal file
20
tests/run_test.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright 2010-2017 Branimir Karadzic. All rights reserved.
|
||||
* License: https://github.com/bkaradzic/bx#license-bsd-2-clause
|
||||
*/
|
||||
|
||||
#define CATCH_CONFIG_RUNNER
|
||||
#include "test.h"
|
||||
|
||||
int runAllTests(int _argc, const char* _argv[])
|
||||
{
|
||||
DBG("Compiler: " BX_COMPILER_NAME
|
||||
", CPU: " BX_CPU_NAME
|
||||
", Architecture: " BX_ARCH_NAME
|
||||
", OS: " BX_PLATFORM_NAME
|
||||
", CRT: " BX_CRT_NAME
|
||||
", Date: " __DATE__
|
||||
", Time: " __TIME__
|
||||
);
|
||||
return Catch::Session().run(_argc, _argv);
|
||||
}
|
||||
@@ -7,6 +7,7 @@
|
||||
#define __TEST_H__
|
||||
|
||||
#include <bx/bx.h>
|
||||
|
||||
#include <catch/catch.hpp>
|
||||
#define TEST(_x) TEST_CASE(#_x, "")
|
||||
#define CHECK_EQUAL(_x, _y) REQUIRE(_x == _y)
|
||||
|
||||
Reference in New Issue
Block a user