summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-03-23 23:20:45 +0100
committerAndreas Kling <kling@serenityos.org>2021-03-24 20:38:20 +0100
commitedb6ada3ef6b3c9c22156db640404f1a66647f5a (patch)
tree43666eb16ac9125364e72e88a845d0445fe1f104 /Userland
parentbce1f956e758dcd8141b0522a204d3ab71ece13f (diff)
downloadserenity-edb6ada3ef6b3c9c22156db640404f1a66647f5a.zip
test-js+test-web: Replace JSTestRunnerCounts with Test::Counts
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Utilities/test-js.cpp15
-rw-r--r--Userland/Utilities/test-web.cpp13
2 files changed, 5 insertions, 23 deletions
diff --git a/Userland/Utilities/test-js.cpp b/Userland/Utilities/test-js.cpp
index ecb7c9e6e4..93a8e8c2a2 100644
--- a/Userland/Utilities/test-js.cpp
+++ b/Userland/Utilities/test-js.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2020, Matthew Olsson <matthewcolsson@gmail.com>
- * Copyright (c) 2020, Linus Groh <mail@linusgroh.de>
+ * Copyright (c) 2020-2021, Linus Groh <mail@linusgroh.de>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -68,15 +68,6 @@ struct JSFileResult {
Vector<String> logged_messages {};
};
-struct JSTestRunnerCounts {
- int tests_failed { 0 };
- int tests_passed { 0 };
- int tests_skipped { 0 };
- int suites_failed { 0 };
- int suites_passed { 0 };
- int files_total { 0 };
-};
-
class TestRunnerGlobalObject final : public JS::GlobalObject {
JS_OBJECT(TestRunnerGlobalObject, JS::GlobalObject);
@@ -109,7 +100,7 @@ public:
void run();
- const JSTestRunnerCounts& counts() const { return m_counts; }
+ const Test::Counts& counts() const { return m_counts; }
bool is_printing_progress() const { return m_print_progress; }
@@ -126,7 +117,7 @@ protected:
bool m_print_progress;
double m_total_elapsed_time_in_ms { 0 };
- JSTestRunnerCounts m_counts;
+ Test::Counts m_counts;
RefPtr<JS::Program> m_test_program;
};
diff --git a/Userland/Utilities/test-web.cpp b/Userland/Utilities/test-web.cpp
index 95b0a09f80..4387283179 100644
--- a/Userland/Utilities/test-web.cpp
+++ b/Userland/Utilities/test-web.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, The SerenityOS developers.
+ * Copyright (c) 2020-2021, The SerenityOS developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -66,15 +66,6 @@ struct JSFileResult {
Vector<String> logged_messages {};
};
-struct JSTestRunnerCounts {
- int tests_failed { 0 };
- int tests_passed { 0 };
- int tests_skipped { 0 };
- int suites_failed { 0 };
- int suites_passed { 0 };
- int files_total { 0 };
-};
-
Function<void(const URL&)> g_on_page_change;
class TestRunnerObject final : public JS::Object {
@@ -138,7 +129,7 @@ private:
bool m_print_times;
double m_total_elapsed_time_in_ms { 0 };
- JSTestRunnerCounts m_counts;
+ Test::Counts m_counts;
RefPtr<Web::InProcessWebView> m_page_view;