aboutsummaryrefslogtreecommitdiff
path: root/test/dm/video.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-01-18 19:52:27 -0700
committerSimon Glass <sjg@chromium.org>2016-01-20 19:10:16 -0700
commit85e08db85bb9d446f3b48e42cec73f9f24073d52 (patch)
tree7fe32af0dd0c0d5d10ac9076c792f3901270dfda /test/dm/video.c
parent3c97c4fb52af9d4da4546cbb8a52bdb6f0d4b57f (diff)
downloadu-boot-85e08db85bb9d446f3b48e42cec73f9f24073d52.zip
u-boot-85e08db85bb9d446f3b48e42cec73f9f24073d52.tar.gz
u-boot-85e08db85bb9d446f3b48e42cec73f9f24073d52.tar.bz2
dm: video: test: Add tests for rotated consoles
Test that text is displayed correctly when the console is rotated. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'test/dm/video.c')
-rw-r--r--test/dm/video.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/dm/video.c b/test/dm/video.c
index b197b01..65db216 100644
--- a/test/dm/video.c
+++ b/test/dm/video.c
@@ -188,3 +188,30 @@ static int dm_test_video_context(struct unit_test_state *uts)
return check_vidconsole_output(uts, 0, 788, 453);
}
DM_TEST(dm_test_video_context, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+
+/* Test rotated text output through the console uclass */
+static int dm_test_video_rotation1(struct unit_test_state *uts)
+{
+ ut_assertok(check_vidconsole_output(uts, 1, 1112, 680));
+
+ return 0;
+}
+DM_TEST(dm_test_video_rotation1, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+
+/* Test rotated text output through the console uclass */
+static int dm_test_video_rotation2(struct unit_test_state *uts)
+{
+ ut_assertok(check_vidconsole_output(uts, 2, 785, 446));
+
+ return 0;
+}
+DM_TEST(dm_test_video_rotation2, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+
+/* Test rotated text output through the console uclass */
+static int dm_test_video_rotation3(struct unit_test_state *uts)
+{
+ ut_assertok(check_vidconsole_output(uts, 3, 1134, 681));
+
+ return 0;
+}
+DM_TEST(dm_test_video_rotation3, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);