linux/drivers/comedi/drivers/tests/ni_routes_test.c

// SPDX-License-Identifier: GPL-2.0+
/*
 *  comedi/drivers/tests/ni_routes_test.c
 *  Unit tests for NI routes (ni_routes.c module).
 *
 *  COMEDI - Linux Control and Measurement Device Interface
 *  Copyright (C) 2016 Spencer E. Olson <[email protected]>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 */

#include <linux/module.h>

#include "../ni_stc.h"
#include "../ni_routes.h"
#include "unittest.h"

#define RVI(table, src, dest)
#define O(x)
#define B(x)
#define V(x)

/* *** BEGIN fake board data *** */
static const char *pci_6070e =;
static const char *pci_6220 =;
static const char *pci_fake =;

static const char *ni_eseries =;
static const char *ni_mseries =;

static struct ni_board_struct board =;

static struct ni_private private =;

static const int bad_dest =), dest0 =), desti =;
static const int ith_dest_index =;
static const int no_val_dest =), no_val_index =;

/* These have to be defs to be used in init code below */
#define rgout0_src0
#define rgout0_src1
#define brd0_src0
#define brd0_src1
#define brd1_src0
#define brd1_src1
#define brd2_src0
#define brd2_src1
#define brd3_src0
#define brd3_src1

/* I1 and I2 should not call O(...).  Mostly here to shut checkpatch.pl up */
#define I1
#define I2
#define I3(x1, x2, x3)

/* O9 is build to call O(...) for each arg */
#define O9

static struct ni_device_routes DR =;

#undef I1
#undef I2
#undef O9

#define RV9

/* This table is indexed as RV[destination][source] */
static const u8 RV[NI_NUM_NAMES][NI_NUM_NAMES] =;

#undef RV9

/* *** END fake board data *** */

/* *** BEGIN board data initializers *** */
static void init_private(void)
{}

static void init_pci_6070e(void)
{}

static void init_pci_6220(void)
{}

static void init_pci_fake(void)
{}

/* *** END board data initializers *** */

/* Tests that route_sets are in order of the signal destination. */
static bool route_set_dests_in_order(const struct ni_device_routes *devroutes)
{}

/* Tests that all route_set->src are in order of the signal source. */
static bool route_set_sources_in_order(const struct ni_device_routes *devroutes)
{}

static void test_ni_assign_device_routes(void)
{}

static void test_ni_sort_device_routes(void)
{}

static void test_ni_find_route_set(void)
{}

static void test_ni_route_set_has_source(void)
{}

static void test_ni_route_to_register(void)
{}

static void test_ni_lookup_route_register(void)
{}

static void test_route_is_valid(void)
{}

static void test_ni_is_cmd_dest(void)
{}

static void test_channel_is_pfi(void)
{}

static void test_channel_is_rtsi(void)
{}

static void test_ni_count_valid_routes(void)
{}

static void test_ni_get_valid_routes(void)
{}

static void test_ni_find_route_source(void)
{}

static void test_route_register_is_valid(void)
{}

static void test_ni_check_trigger_arg(void)
{}

static void test_ni_get_reg_value(void)
{}

/* **** BEGIN simple module entry/exit functions **** */
static int __init ni_routes_unittest(void)
{}

static void __exit ni_routes_unittest_exit(void) {}

module_init();
module_exit(ni_routes_unittest_exit);

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();
/* **** END simple module entry/exit functions **** */