Move the sensor utils into their own module
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I22f6a951921095660fd2be502e59a38161565a95
diff --git a/test/Makefile.am b/test/Makefile.am
index 3d74c88..0703f73 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -40,7 +40,7 @@
sensor_host_unittest_LDADD = $(top_builddir)/sensors/host.o
util_unittest_SOURCES = util_unittest.cpp
-util_unittest_LDADD = $(top_builddir)/util.o
+util_unittest_LDADD = $(top_builddir)/sensors/build_utils.o
pid_zone_unittest_SOURCES = pid_zone_unittest.cpp
pid_zone_unittest_LDADD = $(top_builddir)/pid/ec/pid.o \
diff --git a/test/util_unittest.cpp b/test/util_unittest.cpp
index 6e5e548..457c470 100644
--- a/test/util_unittest.cpp
+++ b/test/util_unittest.cpp
@@ -1,10 +1,15 @@
-#include "util.hpp"
+#include "sensors/build_utils.hpp"
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
+namespace pid_control
+{
+namespace
+{
+
TEST(UtilTest, WriteTypeEmptyString_ReturnsNONE)
{
// Verify it responds to an empty string.
@@ -80,3 +85,6 @@
std::string path = "asdf09as0df9a0fd";
EXPECT_EQ(IOInterfaceType::UNKNOWN, getReadInterfaceType(path));
}
+
+} // namespace
+} // namespace pid_control