Build and run regression and unit tests as C++ programs
[urcu.git] / tests / unit / test_arch.c
CommitLineData
bbc9abdc
MJ
1/*
2 * test_arch.c
3 *
4 * Userspace RCU library - test arch headers
5 *
6 * Copyright February 2021 Michael Jeanson <mjeanson@efficios.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 */
22
23#include <stdio.h>
24#include <urcu/arch.h>
25
26#include "tap.h"
27
28#define NR_TESTS 1
29
30
31/*
32 * This is only to make sure the static inline caa_get_cycles() in the public
33 * headers builds properly.
34 */
35static
36void test_caa_get_cycles(void) {
37 caa_cycles_t cycles = 0;
38
39
40 cycles = caa_get_cycles();
41
42 ok(cycles != 0, "caa_get_cycles works");
43}
44
45int main(void)
46{
47 plan_tests(NR_TESTS);
48
49 test_caa_get_cycles();
50
51 return exit_status();
52}
This page took 0.024045 seconds and 4 git commands to generate.