1 // Copyright 2016 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 "mojo/public/cpp/bindings/lib/hash_util.h" 6 7 #include "mojo/public/interfaces/bindings/tests/test_structs.mojom.h" 8 #include "testing/gtest/include/gtest/gtest.h" 9 10 namespace mojo { 11 namespace test { 12 namespace { 13 14 using HashTest = testing::Test; 15 16 TEST_F(HashTest, NestedStruct) { 17 // Just check that this template instantiation compiles. 18 ASSERT_EQ( 19 ::mojo::internal::Hash(::mojo::internal::kHashSeed, 20 SimpleNestedStruct::New(ContainsOther::New(1))), 21 ::mojo::internal::Hash(::mojo::internal::kHashSeed, 22 SimpleNestedStruct::New(ContainsOther::New(1)))); 23 } 24 25 } // namespace 26 } // namespace test 27 } // namespace mojo 28