2023-08-09 11:41:06 -04:00
|
|
|
#include "haggis_private.h"
|
|
|
|
#include <assert.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
haggis_device dev;
|
|
|
|
FILE *f;
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
f = fopen("output/device", "r");
|
2024-02-11 11:00:28 -05:00
|
|
|
ret = haggis_load_device(&dev, f);
|
2023-08-09 11:41:06 -04:00
|
|
|
fclose(f);
|
|
|
|
if (ret) return ret;
|
|
|
|
assert(dev.major.val == 42);
|
|
|
|
assert(dev.minor.val == 69);
|
|
|
|
return 0;
|
|
|
|
}
|