aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-06-16 23:32:58 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-06-16 23:32:58 -0500
commit545b34108a6752c6a6554f4bda1cafda79e8aabe (patch)
treee6665a363ea8ba1d01662ad3bc6ce0e988a5ddc8
parent1ad51b4ec12a5dc7a270069b27a7bcd8d60da2f0 (diff)
downloadayatana-indicator-power-545b34108a6752c6a6554f4bda1cafda79e8aabe.tar.gz
ayatana-indicator-power-545b34108a6752c6a6554f4bda1cafda79e8aabe.tar.bz2
ayatana-indicator-power-545b34108a6752c6a6554f4bda1cafda79e8aabe.zip
first steps at fixing the tests that broke during GMenuification
-rw-r--r--tests/Makefile.am8
-rw-r--r--tests/test-device.cc7
2 files changed, 6 insertions, 9 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index a194505..d8e329e 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -23,17 +23,13 @@ AM_CXXFLAGS = $(GTEST_CXXFLAGS)
###
TEST_LIBS = \
- $(top_builddir)/src/.libs/libpower.a \
- $(INDICATOR_LIBS) \
- $(UPOWER_LIBS) \
- $(COVERAGE_LDFLAGS) \
+ $(COVERAGE_LDFLAGS) \
$(XORG_GTEST_LDFLAGS) \
libgtest.a
TEST_CPPFLAGS = \
$(AM_CPPFLAGS) \
- $(UPOWER_CFLAGS) \
- $(INDICATOR_CFLAGS)
+ $(SERVICE_DEPS_CFLAGS)
BUILT_SOURCES += gschemas.compiled
CLEANFILES += gschemas.compiled
diff --git a/tests/test-device.cc b/tests/test-device.cc
index ab329f1..9c48699 100644
--- a/tests/test-device.cc
+++ b/tests/test-device.cc
@@ -17,9 +17,10 @@ You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <gio/gio.h>
#include <gtest/gtest.h>
#include "device.h"
-#include "indicator-power.h"
+#include "service.h"
class DeviceTest : public ::testing::Test
{
@@ -597,11 +598,11 @@ TEST_F(DeviceTest, ChoosePrimary)
INDICATOR_POWER_DEVICE_TIME, guint64(tests[j].time),
INDICATOR_POWER_DEVICE_PERCENTAGE, tests[j].percentage,
NULL);
- ASSERT_EQ (a, indicator_power_choose_primary_device(device_list));
+ ASSERT_EQ (a, indicator_power_service_choose_primary_device(device_list));
/* reverse the list to check that list order doesn't matter */
device_list = g_slist_reverse (device_list);
- ASSERT_EQ (a, indicator_power_choose_primary_device(device_list));
+ ASSERT_EQ (a, indicator_power_service_choose_primary_device(device_list));
}
}