1 // Copyright 2020 The Pigweed Authors
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
7 // https://www.apache.org/licenses/LICENSE-2.0
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
19 message TestCaseDescriptor {
20 // Name of the test suite to which this test case belongs.
21 string suite_name = 1;
23 // Name of the test case.
26 // Path to the file in which the test case is defined.
30 message TestCaseExpectation {
31 // The source code for the expression which was run.
32 string expression = 1;
34 // The expression with arguments evaluated.
35 string evaluated_expression = 2;
37 // Line number at which the expectation is located.
38 uint32 line_number = 3;
40 // Whether the expectation succeeded.
50 message TestRunStart {}
61 // Unit test run has started.
62 TestRunStart test_run_start = 1;
64 // Unit test run has ended.
65 TestRunEnd test_run_end = 2;
67 // Start of a test case.
68 TestCaseDescriptor test_case_start = 3;
70 // End of a test case.
71 TestCaseResult test_case_end = 4;
73 // Encountered a disabled test case.
74 TestCaseDescriptor test_case_disabled = 5;
76 // Expectation statement within a test case.
77 TestCaseExpectation test_case_expectation = 6;
81 message TestRunRequest {
82 // Whether to send expectation events for successful checks.
83 bool report_passed_expectations = 1;
87 // Runs registered unit tests, streaming back test events as they occur.
88 rpc Run(TestRunRequest) returns (stream Event) {}