OpenTTD Source: src/tests/tilearea.cpp File Reference

OpenTTD Source 15.3

Data Structures | Functions
tilearea.cpp File Reference

Test functionality from tilearea_type. More...

`#include "../stdafx.h"`
`#include "../3rdparty/catch2/catch.hpp"`
`#include "../tilearea_type.h"`
`#include "../map_func.h"`
`#include "../safeguards.h"`

Go to the source code of this file.

## Data Structures
struct | TileCoord

## Functions
static void | TestSpiralTileSequence (TileCoord center, uint diameter, std::span< TileCoord > expected)
static void | TestSpiralTileSequence (TileCoord start_north, uint radius, uint w, uint h, std::span< TileCoord > expected)
| TEST_CASE ("SpiralTileSequence - minimum")
| TEST_CASE ("SpiralTileSequence - odd")
| TEST_CASE ("SpiralTileSequence - even")
| TEST_CASE ("SpiralTileSequence - zero hole")
| TEST_CASE ("SpiralTileSequence - normal hole")

## Detailed Description

Test functionality from tilearea_type.

Definition in file tilearea.cpp.

## Function Documentation

## ◆ TEST_CASE() [1/5]

TEST_CASE | ( | "SpiralTileSequence - even" |  | ) |

Definition at line 76 of file tilearea.cpp.

## ◆ TEST_CASE() [2/5]

TEST_CASE | ( | "SpiralTileSequence - minimum" |  | ) |

Definition at line 53 of file tilearea.cpp.

## ◆ TEST_CASE() [3/5]

TEST_CASE | ( | "SpiralTileSequence - normal hole" |  | ) |

Definition at line 100 of file tilearea.cpp.

## ◆ TEST_CASE() [4/5]

TEST_CASE | ( | "SpiralTileSequence - odd" |  | ) |

Definition at line 64 of file tilearea.cpp.

## ◆ TEST_CASE() [5/5]

TEST_CASE | ( | "SpiralTileSequence - zero hole" |  | ) |

Definition at line 89 of file tilearea.cpp.

## ◆ TestSpiralTileSequence() [1/2]

static void TestSpiralTileSequence | ( | TileCoord | center,
|  | uint | diameter,
|  | std::span< TileCoord > | expected
| ) |  |
| static

Definition at line 23 of file tilearea.cpp.

## ◆ TestSpiralTileSequence() [2/2]

static void TestSpiralTileSequence | ( | TileCoord | start_north,
|  | uint | radius,
|  | uint | w,
|  | uint | h,
|  | std::span< TileCoord > | expected
| ) |  |
| static

Definition at line 38 of file tilearea.cpp.