diff options
Diffstat (limited to 'src/host/tests/host_results_tests.cpp')
-rw-r--r-- | src/host/tests/host_results_tests.cpp | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/src/host/tests/host_results_tests.cpp b/src/host/tests/host_results_tests.cpp index ba646fc..64ca4e1 100644 --- a/src/host/tests/host_results_tests.cpp +++ b/src/host/tests/host_results_tests.cpp @@ -1,48 +1,48 @@ -/**
- * \file host_results_tests.cpp
- * \brief Automated test for application status reporting.
- * \author Copyright (c) 2008 Jason Perkins and the Premake project
- */
-
-#include "premake.h"
-#include "testing/testing.h"
-extern "C" {
-#include "host/host.h"
-#include "base/error.h"
-#include "base/stream.h"
-}
-
-struct FxResults
-{
- Session sess;
- char buffer[1024];
-
- FxResults()
- {
- sess = session_create();
- stream_set_buffer(Console, buffer);
- }
-
- ~FxResults()
- {
- session_destroy(sess);
- error_clear();
- }
-};
-
-
-SUITE(host)
-{
- TEST_FIXTURE(FxResults, ReportResults_NoMessage_OnNoError)
- {
- host_report_results(sess);
- CHECK_EQUAL("", buffer);
- }
-
- TEST_FIXTURE(FxResults, ReportResults_ErrorMessage_OnError)
- {
- error_set("an error occurred");
- host_report_results(sess);
- CHECK_EQUAL("Error: an error occurred\n", buffer);
- }
-}
+/** + * \file host_results_tests.cpp + * \brief Automated test for application status reporting. + * \author Copyright (c) 2008 Jason Perkins and the Premake project + */ + +#include "premake.h" +#include "testing/testing.h" +extern "C" { +#include "host/host.h" +#include "base/error.h" +#include "base/stream.h" +} + +struct FxResults +{ + Session sess; + char buffer[1024]; + + FxResults() + { + sess = session_create(); + stream_set_buffer(Console, buffer); + } + + ~FxResults() + { + session_destroy(sess); + error_clear(); + } +}; + + +SUITE(host) +{ + TEST_FIXTURE(FxResults, ReportResults_NoMessage_OnNoError) + { + host_report_results(sess); + CHECK_EQUAL("", buffer); + } + + TEST_FIXTURE(FxResults, ReportResults_ErrorMessage_OnError) + { + error_set("an error occurred"); + host_report_results(sess); + CHECK_EQUAL("Error: an error occurred\n", buffer); + } +} |