blob: 0d1720f276bd29a8cf783766266370ab00ce3863 [file] [log] [blame]
// Copyright 2014 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "power_manager/powerd/system/tagged_device.h"
#include "gtest/gtest.h"
namespace power_manager {
namespace system {
TEST(TaggedDeviceTest, HasTag) {
TaggedDevice tagged_device("/sys/devices/a", "foo bar");
EXPECT_TRUE(tagged_device.HasTag("foo"));
EXPECT_TRUE(tagged_device.HasTag("bar"));
EXPECT_FALSE(tagged_device.HasTag("baz"));
}
} // namespace system
} // namespace power_manager