• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include <brillo/message_loops/base_message_loop.h>
6 
7 #include <gtest/gtest.h>
8 
9 #include <brillo/message_loops/message_loop.h>
10 
11 namespace brillo {
12 
13 class BaseMessageLoopTest : public ::testing::Test {};
14 
TEST(BaseMessageLoopTest,ParseBinderMinor)15 TEST(BaseMessageLoopTest, ParseBinderMinor) {
16   EXPECT_EQ(57, BaseMessageLoop::ParseBinderMinor(
17       "227 mcelog\n 58 sw_sync\n 59 ashmem\n 57 binder\n239 uhid\n"));
18   EXPECT_EQ(123, BaseMessageLoop::ParseBinderMinor("123 binder\n"));
19 
20   EXPECT_EQ(BaseMessageLoop::kInvalidMinor,
21             BaseMessageLoop::ParseBinderMinor("227 foo\n239 bar\n"));
22 }
23 
24 }  // namespace brillo
25