mirror of https://github.com/tailix/libkernaux.git
Add some test helper executables
This commit is contained in:
parent
3688a47968
commit
9941c8c715
|
@ -42,6 +42,8 @@
|
|||
/examples/printf_va
|
||||
/examples/units_human
|
||||
|
||||
/tests/multiboot2_header_print1
|
||||
/tests/multiboot2_header_print2
|
||||
/tests/multiboot2_info_print1
|
||||
/tests/multiboot2_info_print2
|
||||
/tests/test_cmdline
|
||||
|
|
12
Makefile.am
12
Makefile.am
|
@ -66,6 +66,8 @@ TESTS += \
|
|||
tests/test_multiboot2_info_print \
|
||||
tests/test_multiboot2_info_validation
|
||||
noinst_PROGRAMS += \
|
||||
tests/multiboot2_header_print1 \
|
||||
tests/multiboot2_header_print2 \
|
||||
tests/multiboot2_info_print1 \
|
||||
tests/multiboot2_info_print2
|
||||
endif
|
||||
|
@ -113,6 +115,16 @@ examples_units_human_SOURCES = \
|
|||
$(libkernaux_a_SOURCES) \
|
||||
examples/units_human.c
|
||||
|
||||
tests_multiboot2_header_print1_SOURCES = \
|
||||
$(libkernaux_a_SOURCES) \
|
||||
tests/multiboot2_header_print1.c \
|
||||
tests/multiboot2_header_example1.h
|
||||
|
||||
tests_multiboot2_header_print2_SOURCES = \
|
||||
$(libkernaux_a_SOURCES) \
|
||||
tests/multiboot2_header_print2.c \
|
||||
tests/multiboot2_header_example2.h
|
||||
|
||||
tests_multiboot2_info_print1_SOURCES = \
|
||||
$(libkernaux_a_SOURCES) \
|
||||
tests/multiboot2_info_print1.c \
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <kernaux/multiboot2.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "multiboot2_header_example1.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
assert(KernAux_Multiboot2_Header_is_valid(
|
||||
(struct KernAux_Multiboot2_Header*)multiboot2_header_example1
|
||||
));
|
||||
|
||||
KernAux_Multiboot2_Header_print(
|
||||
(struct KernAux_Multiboot2_Header*)multiboot2_header_example1,
|
||||
(void (*)(const char *format, ...))printf
|
||||
);
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <kernaux/multiboot2.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "multiboot2_header_example2.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
assert(KernAux_Multiboot2_Header_is_valid(
|
||||
&multiboot2_header_example2.multiboot2_header
|
||||
));
|
||||
|
||||
KernAux_Multiboot2_Header_print(
|
||||
&multiboot2_header_example2.multiboot2_header,
|
||||
(void (*)(const char *format, ...))printf
|
||||
);
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue