1/* 2 * Copyright (c) Facebook, Inc. and its affiliates. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17namespace cpp2 apache.thrift.conformance 18namespace php apache_thrift 19namespace py thrift.conformance.test_suite 20namespace py.asyncio thrift_asyncio.conformance.test_suite 21namespace py3 thrift.conformance 22namespace java.swift org.apache.thrift.conformance 23namespace go thrift.conformance.test_suite 24 25include "thrift/conformance/if/conformance.thrift" 26 27// A Collection of tests. 28struct TestSuite { 29 // The name of the suite. 30 1: string name; 31 32 // A description of the test suite, if useful. 33 2: optional string description; 34 35 // The test cases included in the suite. 36 3: list<Test> tests; 37} 38 39// A collection of test cases. 40struct Test { 41 // The name of the test. 42 1: string name; 43 44 // A description of the test, if useful. 45 2: optional string description; 46 47 // The test cases included in the test. 48 3: list<TestCase> testCases; 49} 50 51// A single test case. 52struct TestCase { 53 // The name of the test. 54 1: string name; 55 56 // A description of the test, if useful. 57 2: optional string description; 58 59 // The test case to run. 60 3: TestCaseUnion test (cpp.mixin); 61} 62 63// A union of all supported test case types. 64union TestCaseUnion { 65 1: RoundTripTestCase roundTrip; 66} 67 68// Tests if a value round trips correctly. 69struct RoundTripTestCase { 70 // The request for the test. 71 1: conformance.RoundTripRequest request; 72 // The expected output of the test, if different from the input. 73 2: optional conformance.RoundTripResponse expectedResponse; 74} 75