michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "gtest/gtest.h" michael@0: #include "gmock/gmock.h" michael@0: michael@0: using ::testing::AtLeast; michael@0: michael@0: // Sanity test to make sure that GTest is hooked into michael@0: // the mozilla build system correctly michael@0: TEST(MozillaGTestSanity, Runs) { michael@0: EXPECT_EQ(1, 1); michael@0: } michael@0: namespace { michael@0: class TestMock { michael@0: public: michael@0: TestMock() {} michael@0: MOCK_METHOD0(MockedCall, void()); michael@0: }; michael@0: } michael@0: TEST(MozillaGMockSanity, Runs) { michael@0: TestMock mockedClass; michael@0: EXPECT_CALL(mockedClass, MockedCall()) michael@0: .Times(AtLeast(3)); michael@0: michael@0: mockedClass.MockedCall(); michael@0: mockedClass.MockedCall(); michael@0: mockedClass.MockedCall(); michael@0: }