11767c5feSopenharmony_ci/*
21767c5feSopenharmony_ci * Copyright (C) 2017 The Libphonenumber Authors.
31767c5feSopenharmony_ci *
41767c5feSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
51767c5feSopenharmony_ci * you may not use this file except in compliance with the License.
61767c5feSopenharmony_ci * You may obtain a copy of the License at
71767c5feSopenharmony_ci *
81767c5feSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0
91767c5feSopenharmony_ci *
101767c5feSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
111767c5feSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
121767c5feSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
131767c5feSopenharmony_ci * See the License for the specific language governing permissions and
141767c5feSopenharmony_ci * limitations under the License.
151767c5feSopenharmony_ci */
161767c5feSopenharmony_ci
171767c5feSopenharmony_cisyntax = "proto3";
181767c5feSopenharmony_ci
191767c5feSopenharmony_cipackage i18n.phonenumbers.internal.finitestatematcher.compiler;
201767c5feSopenharmony_ci
211767c5feSopenharmony_cioption java_package = "com.google.i18n.phonenumbers.internal.finitestatematcher.compiler";
221767c5feSopenharmony_cioption java_outer_classname = "RegressionTestProto";
231767c5feSopenharmony_ci
241767c5feSopenharmony_ci// A set of regression tests.
251767c5feSopenharmony_cimessage Tests {
261767c5feSopenharmony_ci  repeated TestCase test_case = 1;
271767c5feSopenharmony_ci}
281767c5feSopenharmony_ci
291767c5feSopenharmony_ci// A single regression test entry.
301767c5feSopenharmony_cimessage TestCase {
311767c5feSopenharmony_ci  // A name for the test, ideally unique.
321767c5feSopenharmony_ci  string name = 1;
331767c5feSopenharmony_ci  // If set true, expect that the test will fail 100% of the time. This is
341767c5feSopenharmony_ci  // useful to test that test numbers have enough coverage to force a failure
351767c5feSopenharmony_ci  // and is typically achieved by modifying an input range after generating a
361767c5feSopenharmony_ci  // passing test (or carefully modifying the output bytecodes). Note that not
371767c5feSopenharmony_ci  // all changes will make a test fail 100% of the time, so care must be taken
381767c5feSopenharmony_ci  // to avoid creating a flaky test (e.g. don't change a "[0-3]" to "[0-5]", as
391767c5feSopenharmony_ci  // this only fails if the test number contains a 4 or 5 at the corresponding
401767c5feSopenharmony_ci  // index, change it to "[4-6]" so there's no overlap and at least one test
411767c5feSopenharmony_ci  // number that's valid for that range will not be accepted by the matcher).
421767c5feSopenharmony_ci  bool should_fail = 2;
431767c5feSopenharmony_ci  // The input ranges (in the form of range specifications) which form the DFA
441767c5feSopenharmony_ci  // to be tested (e.g. "1[2-5]678xxxxx" etc...).
451767c5feSopenharmony_ci  repeated string range = 3;
461767c5feSopenharmony_ci  // The expected output bytes, encoded in test files using C-style hex notation
471767c5feSopenharmony_ci  // (i.e. \xHH). This can be split over multiple lines for readability.
481767c5feSopenharmony_ci  repeated bytes expected = 4;
491767c5feSopenharmony_ci}
50