>From 7b6a4cf4d5f03af1810ba8f6d0cc1ef9c7452d01 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 10 Mar 2015 17:52:56 +0100 Subject: [PATCH 1/2] Check that the comments field was correctly updated in the test suite. Perform the check immediately to try to detect the errors as early as possible. --- wx_test_validate_output.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/wx_test_validate_output.cpp b/wx_test_validate_output.cpp index 3ecf80f..5815dc1 100644 --- a/wx_test_validate_output.cpp +++ b/wx_test_validate_output.cpp @@ -39,6 +39,7 @@ #include #include +#include #include namespace @@ -82,7 +83,14 @@ struct enter_comments_in_case_defaults_dialog dialog->Show(); wxYield(); - wx_test_focus_controller_child(*dialog, "Comments"); + wxWindow* const comments_window = wx_test_focus_controller_child + (*dialog + ,"Comments" + ); + + wxTextCtrl* const + comments_text = dynamic_cast(comments_window); + LMI_ASSERT(comments_text); wxUIActionSimulator ui; @@ -95,6 +103,8 @@ struct enter_comments_in_case_defaults_dialog ui.Text(comments_.c_str()); wxYield(); + LMI_ASSERT_EQUAL(comments_text->GetValue(), comments_); + return wxID_OK; } -- 2.1.0