test/misc.cc
raw| 1 | // SPDX-License-Identifier: LGPL-2.1-or-later |
| 2 | /** |
| 3 | * This file is part of libnvme. |
| 4 | * Copyright (c) 2025 Daniel Wagner, SUSE LLC |
| 5 | */ |
| 6 | |
| 7 | #include <algorithm> |
| 8 | #include <libnvme.h> |
| 9 | |
| 10 | static int minmax_test() |
| 11 | { |
| 12 | /* |
| 13 | * Ensure libnvme doesn't spoil the namespace, e.g. by exposing a |
| 14 | * min/max macro. |
| 15 | */ |
| 16 | return !(std::min(1, 2) == 1 && std::max(1, 2) == 2); |
| 17 | } |
| 18 | |
| 19 | int main(int argc, char *argv[]) |
| 20 | { |
| 21 | return minmax_test(); |
| 22 | } |