Lines Matching refs:test

15 static void iio_test_iio_format_value_integer(struct kunit *test)  in iio_test_iio_format_value_integer()  argument
17 char *buf = kunit_kmalloc(test, PAGE_SIZE, GFP_KERNEL); in iio_test_iio_format_value_integer()
23 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "42\n"); in iio_test_iio_format_value_integer()
27 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "-23\n"); in iio_test_iio_format_value_integer()
31 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "0\n"); in iio_test_iio_format_value_integer()
35 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "2147483647\n"); in iio_test_iio_format_value_integer()
39 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "-2147483648\n"); in iio_test_iio_format_value_integer()
42 static void iio_test_iio_format_value_fixedpoint(struct kunit *test) in iio_test_iio_format_value_fixedpoint() argument
44 char *buf = kunit_kmalloc(test, PAGE_SIZE, GFP_KERNEL); in iio_test_iio_format_value_fixedpoint()
53 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "1.000010\n"); in iio_test_iio_format_value_fixedpoint()
56 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "1.000010 dB\n"); in iio_test_iio_format_value_fixedpoint()
59 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "1.000000010\n"); in iio_test_iio_format_value_fixedpoint()
66 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "0.000012\n"); in iio_test_iio_format_value_fixedpoint()
69 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "0.000012 dB\n"); in iio_test_iio_format_value_fixedpoint()
72 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "0.000000012\n"); in iio_test_iio_format_value_fixedpoint()
79 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "-1.000010\n"); in iio_test_iio_format_value_fixedpoint()
82 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "-1.000010 dB\n"); in iio_test_iio_format_value_fixedpoint()
85 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "-1.000000010\n"); in iio_test_iio_format_value_fixedpoint()
91 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "-0.000123\n"); in iio_test_iio_format_value_fixedpoint()
94 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "-0.000123 dB\n"); in iio_test_iio_format_value_fixedpoint()
97 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "-0.000000123\n"); in iio_test_iio_format_value_fixedpoint()
100 static void iio_test_iio_format_value_fractional(struct kunit *test) in iio_test_iio_format_value_fractional() argument
102 char *buf = kunit_kmalloc(test, PAGE_SIZE, GFP_KERNEL); in iio_test_iio_format_value_fractional()
110 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "0.100000000\n"); in iio_test_iio_format_value_fractional()
116 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "33.333333333\n"); in iio_test_iio_format_value_fractional()
122 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "-0.000000001\n"); in iio_test_iio_format_value_fractional()
128 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "-66.666666666\n"); in iio_test_iio_format_value_fractional()
134 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "0.000000000\n"); in iio_test_iio_format_value_fractional()
137 static void iio_test_iio_format_value_fractional_log2(struct kunit *test) in iio_test_iio_format_value_fractional_log2() argument
139 char *buf = kunit_kmalloc(test, PAGE_SIZE, GFP_KERNEL); in iio_test_iio_format_value_fractional_log2()
147 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "0.120117187\n"); in iio_test_iio_format_value_fractional_log2()
153 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "1205.631835937\n"); in iio_test_iio_format_value_fractional_log2()
159 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "-0.120117187\n"); in iio_test_iio_format_value_fractional_log2()
165 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "-1205.631835937\n"); in iio_test_iio_format_value_fractional_log2()
171 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "0.000000000\n"); in iio_test_iio_format_value_fractional_log2()
174 static void iio_test_iio_format_value_multiple(struct kunit *test) in iio_test_iio_format_value_multiple() argument
176 char *buf = kunit_kmalloc(test, PAGE_SIZE, GFP_KERNEL); in iio_test_iio_format_value_multiple()
182 IIO_TEST_FORMAT_EXPECT_EQ(test, buf, ret, "1 -2 3 -4 5 \n"); in iio_test_iio_format_value_multiple()