Skip to content
Permalink
Browse files

Switched fully to C++11 hash map/sets.

  • Loading branch information...
jacobsa committed Jan 8, 2014
1 parent d4c5ef1 commit c1f1208ba58e6ba549053695f33df6881e05d1e0
Showing with 9 additions and 53 deletions.
  1. +0 −1 Makefile
  2. +9 −9 gjstest/internal/cpp/run_tests.cc
  3. +0 −1 gjstest/internal/cpp/targets.mk
  4. +0 −36 util/hash/hash.h
  5. +0 −5 util/hash/targets.mk
  6. +0 −1 webutil/xml/targets.mk
@@ -50,7 +50,6 @@ include gjstest/public/targets.mk
include strings/targets.mk
include third_party/cityhash/targets.mk
include util/gtl/targets.mk
include util/hash/targets.mk
include webutil/xml/targets.mk

######################################################
@@ -16,6 +16,7 @@
#include "gjstest/internal/cpp/run_tests.h"

#include <string>
#include <unordered_map>
#include <vector>

#include <re2/re2.h>
@@ -33,7 +34,6 @@
#include "gjstest/internal/proto/named_scripts.pb.h"
#include "strings/strutil.h"
#include "util/gtl/map_util.h"
#include "util/hash/hash.h"
#include "webutil/xml/xml_writer.h"

using v8::Array;
@@ -80,8 +80,8 @@ static const char kCoverageExtractionJs[] =
static string MakeXml(
uint32 duration_ms,
const vector<string>& tests_run,
const hash_map<string, double>& test_durations,
const hash_map<string, string>& test_failure_messages) {
const std::unordered_map<string, double>& test_durations,
const std::unordered_map<string, string>& test_failure_messages) {
webutil_xml::XmlWriter xml_writer("UTF-8", true);
xml_writer.StartDocument("UTF-8");

@@ -134,8 +134,8 @@ static void ProcessTestCase(
const Handle<Function>& test_function,
bool* success,
string* output,
hash_map<string, string>* test_failure_messages,
hash_map<string, double>* test_durations) {
std::unordered_map<string, string>* test_failure_messages,
std::unordered_map<string, double>* test_durations) {
// Run the test.
TestCase test_case(test_function);
test_case.Run();
@@ -175,8 +175,8 @@ static void ProcessTestSuite(
bool* success,
string* output,
vector<string>* tests_run,
hash_map<string, string>* test_failure_messages,
hash_map<string, double>* test_durations) {
std::unordered_map<string, string>* test_failure_messages,
std::unordered_map<string, double>* test_durations) {
StringAppendF(output, "[----------]\n");

const Local<Array> test_names = test_functions->GetPropertyNames();
@@ -239,8 +239,8 @@ bool RunTests(

// Keep maps from test name to failure message (if the test failed) and
// duration in seconds.
hash_map<string, string> test_failure_messages;
hash_map<string, double> test_durations;
std::unordered_map<string, string> test_failure_messages;
std::unordered_map<string, double> test_durations;
vector<string> tests_run;

// Keep track of how long the whole process takes, and whether there are any
@@ -27,7 +27,6 @@ $(eval $(call cc_library, \
gjstest/internal/proto/named_scripts.pb \
strings/strutil \
util/gtl/map_util \
util/hash/hash \
webutil/xml/xml_writer \
))

This file was deleted.

This file was deleted.

@@ -6,7 +6,6 @@ $(eval $(call cc_library, \
base/scoped_ptr \
base/stl_decl \
base/stringprintf \
util/hash/hash \
))

######################################################

0 comments on commit c1f1208

Please sign in to comment.
You can’t perform that action at this time.