Files
allwpilib/wpiutil/src/test/native/cpp/hostname.cpp

21 lines
824 B
C++
Raw Normal View History

2017-08-27 21:35:34 -07:00
/*----------------------------------------------------------------------------*/
2018-01-01 17:32:39 -08:00
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
2017-08-27 21:35:34 -07:00
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
#include "wpi/hostname.h"
2017-08-27 21:35:34 -07:00
#include "gtest/gtest.h"
#include "wpi/SmallString.h"
#include "wpi/SmallVector.h"
2017-08-27 21:35:34 -07:00
namespace wpi {
TEST(HostNameTest, HostNameNotEmpty) { ASSERT_NE(GetHostname(), ""); }
2017-08-27 21:35:34 -07:00
TEST(HostNameTest, HostNameNotEmptySmallVector) {
SmallVector<char, 256> name;
ASSERT_NE(GetHostname(name), "");
2017-08-27 21:35:34 -07:00
}
} // namespace wpi