OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include <set> | |
6 #include <string> | |
7 | |
8 #include "remoting/host/pin_hash.h" | |
9 #include "testing/gtest/include/gtest/gtest.h" | |
10 | |
11 namespace remoting { | |
12 | |
13 class PinHashTest : public testing::Test { | |
14 }; | |
15 | |
16 TEST_F(PinHashTest, DifferentHashValues) { | |
17 std::string host_id1("Host ID 1"); | |
18 std::string host_id2("Host ID 2"); | |
19 std::string pin1("1111"); | |
20 std::string pin2("2222"); | |
21 std::set<std::string> hash_set; | |
22 hash_set.insert(GetPinHash(host_id1, pin1)); | |
23 hash_set.insert(GetPinHash(host_id1, pin2)); | |
24 hash_set.insert(GetPinHash(host_id2, pin1)); | |
25 hash_set.insert(GetPinHash(host_id2, pin2)); | |
26 ASSERT_EQ(4, hash_set.size()); | |
Wez
2012/04/30 23:13:57
I think it'd be preferable to have a list of (host
simonmorris
2012/05/01 00:25:55
Done.
| |
27 } | |
28 | |
29 } // namespace remoting | |
OLD | NEW |