test: pid: thermalcontroller

Tests for the pid/thermalcontroller module.
Fixes a bug where one could pass an incorrect number of inputs
to the thermalcontroller.  This can still be side-stepped by calling the
constructor directly.

Tested: Ran on quanta-q71l board and it behaved as expected.

Change-Id: I3153ae4d907d9f90787b03e9d013d4349d911948
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/test/Makefile.am b/test/Makefile.am
index ec40421..6bd5138 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -12,7 +12,8 @@
 
 # Run all 'check' test programs
 check_PROGRAMS = sensor_manager_unittest sensor_pluggable_unittest \
- sensor_host_unittest util_unittest pid_zone_unittest
+ sensor_host_unittest util_unittest pid_zone_unittest \
+ pid_thermalcontroller_unittest
 TESTS = $(check_PROGRAMS)
 
 # Until libconfig is mocked out or replaced, include it.
@@ -32,3 +33,8 @@
 pid_zone_unittest_LDADD = $(top_builddir)/pid/ec/pid.o \
  $(top_builddir)/sensors/manager.o $(top_builddir)/pid/controller.o \
  $(top_builddir)/pid/zone.o
+
+pid_thermalcontroller_unittest_SOURCES = pid_thermalcontroller_unittest.cpp
+pid_thermalcontroller_unittest_LDADD = $(top_builddir)/pid/ec/pid.o \
+ $(top_builddir)/pid/util.o $(top_builddir)/pid/controller.o \
+ $(top_builddir)/pid/thermalcontroller.o