| 1 | /* |
|---|---|
| 2 | SPDX-FileCopyrightText: 2021 Volker Krause <vkrause@kde.org> |
| 3 | |
| 4 | SPDX-License-Identifier: LGPL-2.0-or-later |
| 5 | */ |
| 6 | |
| 7 | #include "spatial_index_property_p.h" |
| 8 | |
| 9 | // unit tests for the spatial index property table type |
| 10 | static_assert(sizeof(SpatialIndexProperty) == 6); |
| 11 | |
| 12 | // timezone only |
| 13 | static_assert(SpatialIndexProperty(Tz::Pacific_Auckland).m_tz == Tz::Pacific_Auckland); |
| 14 | static_assert(SpatialIndexProperty(Tz::Pacific_Auckland).m_subdiv == 0); |
| 15 | |
| 16 | // country only |
| 17 | static_assert(SpatialIndexProperty(Tz::Europe_Zurich, "CH").m_subdiv > 0); |
| 18 | static_assert((SpatialIndexProperty(Tz::Europe_Zurich, "CH").m_subdiv & 0xffff) == 0); |
| 19 | |
| 20 | // subdivision |
| 21 | static_assert(SpatialIndexProperty(Tz::Europe_Paris, "FR-IDF").m_subdiv > 0); |
| 22 | static_assert((SpatialIndexProperty(Tz::Europe_Paris, "FR-IDF").m_subdiv & 0xffff) > 0); |
| 23 |
