2023-01-10 14:50:49 +01:00
|
|
|
#include "emu/value.h"
|
|
|
|
#include "common.h"
|
|
|
|
|
|
|
|
int
|
|
|
|
main(void)
|
|
|
|
{
|
|
|
|
struct value a, b;
|
|
|
|
|
|
|
|
memset(&a, 66, sizeof(struct value));
|
|
|
|
memset(&b, 0, sizeof(struct value));
|
|
|
|
|
|
|
|
a = value_null();
|
|
|
|
|
|
|
|
/* Ensure we can use the whole size of the value struct to
|
|
|
|
* compare two values, so we don't have problems with
|
|
|
|
* unitialized holes due to alignment */
|
|
|
|
if (memcmp(&a, &b, sizeof(struct value)) != 0)
|
|
|
|
die("values are not the same\n");
|
|
|
|
|
|
|
|
err("OK\n");
|
|
|
|
|
2023-01-31 18:24:10 +01:00
|
|
|
a = value_null();
|
|
|
|
b = value_null();
|
|
|
|
|
|
|
|
if (!value_is_equal(&a, &b))
|
|
|
|
die("null not equal");
|
|
|
|
|
2023-01-10 14:50:49 +01:00
|
|
|
return 0;
|
|
|
|
}
|