// SPDX-License-Identifier: GPL-2.0+ /* * comedi/drivers/tests/comedi_example_test.c * Example set of unit tests. * * COMEDI - Linux Control and Measurement Device Interface * Copyright (C) 2016 Spencer E. Olson <olsonse@umich.edu> * * 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"unittest.h"
/* *** BEGIN fake board data *** */ struct comedi_device { constchar *board_name; int item;
};
staticstruct comedi_device dev = {
.board_name = "fake_device",
};
/* *** END fake board data *** */
/* *** BEGIN fake data init *** */ staticvoid init_fake(void)
{
dev.item = 10;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.