diff options
| author | waynema <waynema@google.com> | 2018-11-21 13:31:34 +0800 |
|---|---|---|
| committer | waynema <waynema@google.com> | 2019-01-15 16:19:14 +0800 |
| commit | 71a0b59056230278dd3466b253be2d35c3f77cab (patch) | |
| tree | e8b5ae3a735065aded6b84dcddf8c074b47b6a0f /server/TetherControllerTest.cpp | |
| parent | d9c80e94f6c347ca0700cd85d3686e9e1a4f4c29 (diff) | |
Remove sscanf() in TetherController.
Test: netd_unit_test, netd_integration_test, libnetd_resolv_test
Change-Id: Ibff2d6cc5dbf4fb09fcd1862be1b71be3b1d9f8e
Diffstat (limited to 'server/TetherControllerTest.cpp')
| -rw-r--r-- | server/TetherControllerTest.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/TetherControllerTest.cpp b/server/TetherControllerTest.cpp index 969cbcd4..309a6d52 100644 --- a/server/TetherControllerTest.cpp +++ b/server/TetherControllerTest.cpp @@ -428,7 +428,8 @@ TEST_F(TetherControllerTest, TestGetTetherStats) { // Token unit test of the fact that we return the stats in the error message which the caller // ignores. - std::string expectedError = counters; + // Skip header since we only saved the last line we parsed. + std::string expectedError = counterLines[2]; std::string err = result.status().msg(); ASSERT_LE(expectedError.size(), err.size()); EXPECT_TRUE(std::equal(expectedError.rbegin(), expectedError.rend(), err.rbegin())); |
