blob: 0da01c72e169722e2ecc1a60baa0fd39be7ca991 [file] [log] [blame]
// Copyright 2021 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 "biod/utils.h"
#include <string>
#include <gtest/gtest.h>
namespace biod {
TEST(UtilsTest, LogSafeID_Normal) {
EXPECT_EQ(LogSafeID("0123456789_ABCDEF_0123456789"), "01*");
}
TEST(UtilsTest, LogSafeID_Small) {
EXPECT_EQ(LogSafeID("K"), "K");
}
TEST(UtilsTest, LogSafeID_BlankString) {
EXPECT_EQ(LogSafeID(""), "");
}
} // namespace biod