1 // Copyright 2022 The Android Open Source Project 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 "util/os_utils.h" 16 17 #include <cstdio> 18 #include <fstream> 19 #include <string> 20 21 #include "gtest/gtest.h" 22 #include "util/filesystem.h" 23 24 namespace netsim { 25 namespace testing { 26 namespace { 27 28 // Test that the result of GetDiscoveryDir exists TEST(OsUtilsTest,GetDiscoveryDir)29TEST(OsUtilsTest, GetDiscoveryDir) { 30 auto dir = osutils::GetDiscoveryDirectory(); 31 EXPECT_TRUE(netsim::filesystem::exists(dir)); 32 } 33 34 } // namespace 35 } // namespace testing 36 } // namespace netsim 37