1 /* 2 * Copyright 2020 The Android Open Source Project 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 17 #define LOG_TAG "ObjReaderTests" 18 19 #include "ObjReader.h" 20 21 #include "MtlReader.h" 22 #include "core_lib.h" 23 24 #include <gtest/gtest.h> 25 #include <map> 26 #include <string> 27 28 namespace android { 29 namespace hardware { 30 namespace automotive { 31 namespace sv { 32 namespace V1_0 { 33 namespace implementation { 34 namespace { 35 TEST(ObjParserTests,ReadCubeSuccess)36TEST(ObjParserTests, ReadCubeSuccess) { 37 std::map<std::string, CarPart> carPartsMap; 38 EXPECT_TRUE(ReadObjFromFile("/etc/automotive/sv/cube.obj", &carPartsMap)); 39 EXPECT_NE(carPartsMap.size(), 0); 40 } 41 42 } // namespace 43 } // namespace implementation 44 } // namespace V1_0 45 } // namespace sv 46 } // namespace automotive 47 } // namespace hardware 48 } // namespace android 49