TEST(sml_proc_par_value, write_time) { sml_proc_par_value *ppv = sml_proc_par_value_init(); ppv->tag = sml_u8_init(SML_PROC_PAR_VALUE_TAG_TIME); sml_time *t = sml_time_init(); t->data.sec_index = sml_u32_init(255); t->tag = sml_u8_init(SML_TIME_SEC_INDEX); ppv->data.time = t; sml_proc_par_value_write(ppv, buf); expected_buf(buf, "72620472620165000000FF", 11); }
TEST(sml_number, init_unsigned8) { u8 *n = sml_u8_init(1); TEST_ASSERT_NOT_NULL(n); TEST_ASSERT_EQUAL(1, *n); sml_u8_free( n ); }
TEST(sml_number, write_unsigned8) { u8 *n = sml_u8_init(1); sml_u8_write(n, buf); expected_buf(buf, "6201", 2); sml_u8_free( n ); }