Beispiel #1
0
TEST(sml_value, write_integer16) {
	sml_value *v = sml_value_init();
	v->type = SML_TYPE_INTEGER | SML_TYPE_NUMBER_16;
	v->data.int16 = sml_i16_init(-5);

	sml_value_write(v, buf);
	expected_buf(buf, "53FFFB", 3);
}
Beispiel #2
0
TEST(sml_number, init_integer16) {
	i16 *n = sml_i16_init(-1);
	TEST_ASSERT_NOT_NULL(n);
	TEST_ASSERT_EQUAL(-1, *n);
	sml_i16_free( n );
}