Merge "Move utils unit tests to a utils specific test dir"

This commit is contained in:
Rahul Frias
2019-09-20 21:00:32 +00:00
committed by Android (Google) Code Review
4 changed files with 25 additions and 27 deletions

View File

@@ -9,7 +9,7 @@ LOCAL_PATH := $(call my-dir)
# routine.
test_name := base64_test
test_src_dir := ../core/test
test_src_dir := ../util/test
include $(LOCAL_PATH)/unit-test.mk
test_name := buffer_reader_test
@@ -67,11 +67,11 @@ test_src_dir := ../metrics/test
include $(LOCAL_PATH)/unit-test.mk
test_name := file_store_unittest
test_src_dir := ../core/test
test_src_dir := ../util/test
include $(LOCAL_PATH)/unit-test.mk
test_name := file_utils_unittest
test_src_dir := .
test_src_dir := ../util/test
include $(LOCAL_PATH)/unit-test.mk
test_name := generic_crypto_unittest

View File

@@ -42,8 +42,8 @@ const std::string kOneByteOverB64Data("SGVsbG8gRnJpZW5kIQ==");
const std::string kTwoBytesOverB64Data("SGVsbG8gRnJpZW5kISE=");
const std::string kB64TestData = "GPFc9rc+INmI8FwtyTrUrv6xnKHWZNZ/5uaT21nFjNg=";
const std::pair<const std::string *, const std::string *> kBase64TestVectors[] =
{make_pair(&kNullString, &kNullString),
const std::pair<const std::string*, const std::string*> kBase64TestVectors[] = {
make_pair(&kNullString, &kNullString),
make_pair(&kf, &kfB64),
make_pair(&kfo, &kfoB64),
make_pair(&kfoo, &kfooB64),

View File

@@ -104,8 +104,7 @@ TEST_F(FileTest, FileSize) {
EXPECT_EQ(file->Write(write_data.data(), write_data_size), write_data_size);
EXPECT_TRUE(file_system.Exists(path));
EXPECT_EQ(static_cast<ssize_t>(write_data_size),
file_system.FileSize(path));
EXPECT_EQ(static_cast<ssize_t>(write_data_size), file_system.FileSize(path));
}
TEST_F(FileTest, WriteReadBinaryFile) {
@@ -159,9 +158,8 @@ TEST_F(FileTest, ListFiles) {
// Should find three files. Order not important.
EXPECT_EQ(3u, names.size());
EXPECT_THAT(names, ::testing::UnorderedElementsAre(kTestFileName,
kTestFileName2,
kTestFileName3));
EXPECT_THAT(names, ::testing::UnorderedElementsAre(
kTestFileName, kTestFileName2, kTestFileName3));
std::string wild_card_path = path_dir + kWildcard + kTestFileNameExt;
EXPECT_TRUE(file_system.Remove(wild_card_path));