1 // Copyright (C) 2019 Google LLC 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://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, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #include "icing/testing/test-data.h" 16 17 #include <sys/mman.h> 18 19 #include <cstdint> 20 21 #include "devtools/build/runtime/get_runfiles_dir.h" 22 #include "icing/text_classifier/lib3/utils/base/status.h" 23 #include "icing/absl_ports/canonical_errors.h" 24 #include "icing/absl_ports/str_cat.h" 25 #include "icing/file/filesystem.h" 26 #include "unicode/udata.h" 27 #include "unicode/utypes.h" 28 29 namespace icing { 30 namespace lib { 31 GetTestFilePath(const std::string & google3_relative_file_path)32std::string GetTestFilePath(const std::string& google3_relative_file_path) { 33 return absl_ports::StrCat(devtools_build::testonly::GetTestSrcdir(), 34 "/google3/", google3_relative_file_path); 35 } 36 37 } // namespace lib 38 } // namespace icing 39