mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-25 21:24:12 +01:00
Codefix: stdafx.h and safeguards.h should be the first and last include in every source file, and not appear in any header file.
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
|
||||
#include "../core/bitmath_func.hpp"
|
||||
|
||||
#include "../safeguards.h"
|
||||
|
||||
TEST_CASE("SetBitIterator tests")
|
||||
{
|
||||
auto test_case = [&](auto input, std::initializer_list<uint> expected) {
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
|
||||
#include "../3rdparty/catch2/catch.hpp"
|
||||
|
||||
#include "../safeguards.h"
|
||||
|
||||
enum TestEnum : int8_t {
|
||||
ZERO,
|
||||
ONE,
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
#include "../landscape.h"
|
||||
#include "../slope_func.h"
|
||||
|
||||
#include "../safeguards.h"
|
||||
|
||||
/**
|
||||
* Check whether the addition of two slope's GetPartialPixelZ values results in
|
||||
* the GetPartialPixelZ values of the expected slope.
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
|
||||
#include "../core/math_func.hpp"
|
||||
|
||||
#include "../safeguards.h"
|
||||
|
||||
TEST_CASE("DivideApproxTest - Negative")
|
||||
{
|
||||
CHECK(-2 == DivideApprox(-5, 2));
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
#ifndef MOCK_FONTCACHE_H
|
||||
#define MOCK_FONTCACHE_H
|
||||
|
||||
#include "../stdafx.h"
|
||||
|
||||
#include "../fontcache.h"
|
||||
#include "../string_func.h"
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
#include "../spritecache_internal.h"
|
||||
#include "../table/sprites.h"
|
||||
|
||||
#include "../safeguards.h"
|
||||
|
||||
static bool MockLoadNextSprite(SpriteID load_index)
|
||||
{
|
||||
static UniquePtrSpriteAllocator allocator;
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
|
||||
#include "table/strings.h"
|
||||
|
||||
#include "../safeguards.h"
|
||||
|
||||
/**** String compare/equals *****/
|
||||
|
||||
TEST_CASE("StrCompareIgnoreCase - std::string")
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
#include "../network/core/packet.h"
|
||||
#include "../string_func.h"
|
||||
|
||||
#include "../safeguards.h"
|
||||
|
||||
/* The length of the hexadecimal representation of a X25519 key must fit in the key length. */
|
||||
static_assert(NETWORK_SECRET_KEY_LENGTH >= X25519_KEY_SIZE * 2 + 1);
|
||||
static_assert(NETWORK_PUBLIC_KEY_LENGTH >= X25519_KEY_SIZE * 2 + 1);
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
|
||||
#include <squirrel.h>
|
||||
|
||||
#include "../safeguards.h"
|
||||
|
||||
/**
|
||||
* A controller to start enough so we can use Squirrel for testing.
|
||||
*
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
|
||||
#include "../window_gui.h"
|
||||
|
||||
#include "../safeguards.h"
|
||||
|
||||
/**
|
||||
* List of WindowDescs. Defined in window.cpp but not exposed as this unit-test is the only other place that needs it.
|
||||
* WindowDesc is a self-registering class so all WindowDescs will be included in the list.
|
||||
|
||||
Reference in New Issue
Block a user