Commit db518e6a authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

Simplify test by calling strlen() instead of std::move().

(The motivation here is to fix a compile error on the libc++ bot -- looks like
std::size() is a C++17 thing, and libc++ only enables these functions with
/std:c++17 while the MSVC STL allows it even in C++14 language mode. But using
strlen() is simpler too.)

Bug: 801780
Change-Id: Ic955935253e61d3a3947a314a2bdc3e0a9354016
Reviewed-on: https://chromium-review.googlesource.com/1182081Reviewed-by: default avatarGreg Thompson <grt@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585089}
parent 5c5f556a
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
// This file contains unit tests for PEImage. // This file contains unit tests for PEImage.
#include <algorithm> #include <algorithm>
#include <iterator>
#include <vector> #include <vector>
#include "base/files/file_path.h" #include "base/files/file_path.h"
...@@ -214,7 +213,7 @@ TEST(PEImageTest, GetDebugId) { ...@@ -214,7 +213,7 @@ TEST(PEImageTest, GetDebugId) {
LPCSTR pdb_file = nullptr; LPCSTR pdb_file = nullptr;
size_t pdb_file_length = 0; size_t pdb_file_length = 0;
EXPECT_TRUE(pe.GetDebugId(&guid, &age, &pdb_file, &pdb_file_length)); EXPECT_TRUE(pe.GetDebugId(&guid, &age, &pdb_file, &pdb_file_length));
EXPECT_EQ(pdb_file_length, std::size(kPdbFileName) - 1); EXPECT_EQ(pdb_file_length, strlen(kPdbFileName));
EXPECT_STREQ(pdb_file, kPdbFileName); EXPECT_STREQ(pdb_file, kPdbFileName);
// Should be valid to call without parameters. // Should be valid to call without parameters.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment