blob: 291dec39ac56949f5a06f73ce3d698375d94a836 [file] [log] [blame]
Alexei Frolov80246792020-11-05 21:12:45 -08001// Copyright 2020 The Pigweed Authors
2//
3// Licensed under the Apache License, Version 2.0 (the "License"); you may not
4// use this file except in compliance with the License. You may obtain a copy of
5// the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12// License for the specific language governing permissions and limitations under
13// the License.
14
15#include "pw_unit_test/internal/rpc_event_handler.h"
16
17#include "pw_unit_test/unit_test_service.h"
18
19namespace pw::unit_test::internal {
20
21void RpcEventHandler::RunAllTestsStart() { service_.WriteTestRunStart(); }
22
23void RpcEventHandler::RunAllTestsEnd(const RunTestsSummary& run_tests_summary) {
24 service_.WriteTestRunEnd(run_tests_summary);
25}
26
27void RpcEventHandler::TestCaseStart(const TestCase& test_case) {
28 service_.WriteTestCaseStart(test_case);
29}
30
31void RpcEventHandler::TestCaseEnd(const TestCase&, TestResult result) {
32 service_.WriteTestCaseEnd(result);
33}
34
35void RpcEventHandler::TestCaseExpect(const TestCase&,
36 const TestExpectation& expectation) {
37 service_.WriteTestCaseExpectation(expectation);
38}
39
40void RpcEventHandler::TestCaseDisabled(const TestCase& test_case) {
41 service_.WriteTestCaseDisabled(test_case);
42}
43
44} // namespace pw::unit_test::internal