]> sigrok.org Git - libsigrok.git/blobdiff - tests/analog.c
tests: Drop another obsolete sr_analog_float_to_string() test.
[libsigrok.git] / tests / analog.c
index c2c6555ca352049f25c50e182f343d732b41508e..13eb107cd1b0ce5daf1c8fb6f198f023c72d2b70 100644 (file)
@@ -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);