#include "tile/base/internal/case_insensitive_hash_map.h"

#include "gtest/gtest.h"

#include <string>

namespace tile {
namespace internal {
TEST(CaseInsensitiveHashMap, Easy)
{
    CaseInsensitiveHashMap<std::string, std::string> m;

    m["a"] = "1";
    m["b"] = "10";
    m["C"] = "-5";
    m["c"] = "3";// Overwrites "C"

    ASSERT_EQ("1", m["a"]);
    ASSERT_EQ("1", m["A"]);
    ASSERT_EQ("3", m["C"]);
    ASSERT_FALSE(m.count("d"));
    ASSERT_EQ(3, m.size());
}

}// namespace internal
}// namespace tile
