summaryrefslogtreecommitdiff
path: root/tests/lib/Makefile.inc
diff options
context:
space:
mode:
authorHsuan Ting Chen <roccochen@chromium.org>2023-07-05 19:07:23 +0800
committerMartin L Roth <gaumless@gmail.com>2023-08-30 15:20:59 +0000
commitabaa4b5a9630349b6ca9998adf2931e186713e9f (patch)
tree16e61a2e18610f8adb2e46721e5ad7ae648a6233 /tests/lib/Makefile.inc
parentcbedae116cccbb6399f854d4392c28b710705323 (diff)
tests/lib: Add unit tests for ux_locales_get_text()
Add unit tests for ux_locales_get_text() in lib/ux_locales.c. BUG=b:264666392, b:289995591 BRANCH=brya TEST=make tests/lib/ux_locales-test TEST=Make sure ux_locales.c has 100% test coverage Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org> Change-Id: I4d73419c02478870942828d324c258ef0eaa983c Reviewed-on: https://review.coreboot.org/c/coreboot/+/76253 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com> Reviewed-by: Jakub Czapiga <jacz@semihalf.com>
Diffstat (limited to 'tests/lib/Makefile.inc')
-rw-r--r--tests/lib/Makefile.inc9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/lib/Makefile.inc b/tests/lib/Makefile.inc
index 9a624767ca..3b8e93c9c2 100644
--- a/tests/lib/Makefile.inc
+++ b/tests/lib/Makefile.inc
@@ -40,6 +40,7 @@ tests-y += cbfs-no-verification-has-sha512-test
tests-y += cbfs-lookup-no-mcache-test
tests-y += cbfs-lookup-has-mcache-test
tests-y += lzma-test
+tests-y += ux_locales-test
lib-test-srcs += tests/lib/lib-test.c
@@ -241,3 +242,11 @@ lzma-test-srcs += tests/lib/lzma-test.c
lzma-test-srcs += tests/stubs/console.c
lzma-test-srcs += src/lib/lzma.c
lzma-test-srcs += src/lib/lzmadecode.c
+
+ux_locales-test-srcs += tests/lib/ux_locales-test.c
+ux_locales-test-srcs += tests/stubs/console.c
+ux_locales-test-srcs += src/lib/ux_locales.c
+ux_locales-test-mocks += _cbfs_alloc \
+ cbfs_unmap \
+ vb2api_get_locale_id \
+ vboot_get_context