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. */
|
|
|
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
|
|
2018-04-29 23:33:19 -07:00
|
|
|
#include "wpi/hostname.h"
|
2017-08-27 21:35:34 -07:00
|
|
|
|
|
|
|
|
#include "gtest/gtest.h"
|
2018-04-29 23:33:19 -07:00
|
|
|
#include "wpi/SmallString.h"
|
|
|
|
|
#include "wpi/SmallVector.h"
|
2017-08-27 21:35:34 -07:00
|
|
|
|
|
|
|
|
namespace wpi {
|
2018-04-29 23:33:19 -07:00
|
|
|
TEST(HostNameTest, HostNameNotEmpty) { ASSERT_NE(GetHostname(), ""); }
|
2017-08-27 21:35:34 -07:00
|
|
|
TEST(HostNameTest, HostNameNotEmptySmallVector) {
|
2018-04-29 23:33:19 -07:00
|
|
|
SmallVector<char, 256> name;
|
|
|
|
|
ASSERT_NE(GetHostname(name), "");
|
2017-08-27 21:35:34 -07:00
|
|
|
}
|
|
|
|
|
} // namespace wpi
|