X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=tests%2Fanalog.c;h=13eb107cd1b0ce5daf1c8fb6f198f023c72d2b70;hb=211cc97471b2b837dbd4a78e796d61cea58a1b04;hp=c2c6555ca352049f25c50e182f343d732b41508e;hpb=6b71bf1ba076f697bde8e41dbaa413bb3ec44326;p=libsigrok.git diff --git a/tests/analog.c b/tests/analog.c index c2c6555c..13eb107c 100644 --- a/tests/analog.c +++ b/tests/analog.c @@ -124,34 +124,6 @@ START_TEST(test_analog_to_float_null) } END_TEST -#if 0 -START_TEST(test_analog_float_to_string) -{ - int ret; - unsigned int i; - char *result; - const char *r[] = {"3", "3.1", "3.14", "3.145", "3.1415", "3.15159"}; - - for (i = 0; i < ARRAY_SIZE(r); i++) { - ret = sr_analog_float_to_string(G_PI, i, &result); - fail_unless(ret == SR_OK); - fail_unless(result != NULL); - fail_unless(!strcmp(result, r[i]), "%s != %s", result, r[i]); - g_free(result); - } -} -END_TEST -#endif - -START_TEST(test_analog_float_to_string_null) -{ - int ret; - - ret = sr_analog_float_to_string(0, 0, NULL); - fail_unless(ret == SR_ERR_ARG); -} -END_TEST - START_TEST(test_analog_unit_to_string) { int ret; @@ -234,10 +206,6 @@ Suite *suite_analog(void) tc = tcase_create("analog_to_float"); tcase_add_test(tc, test_analog_to_float); tcase_add_test(tc, test_analog_to_float_null); -#if 0 - tcase_add_test(tc, test_analog_float_to_string); -#endif - tcase_add_test(tc, test_analog_float_to_string_null); tcase_add_test(tc, test_analog_unit_to_string); tcase_add_test(tc, test_analog_unit_to_string_null); tcase_add_test(tc, test_set_rational);