Commit 8622e554 by Geoff Lang

Merge 16a3eb3e from master.

Fix compiler test initialization issues. We should call ShInitialize() / ShFinalize() once per process, so moving them out of individual test's Setup() / Shutdown() to the test main(). BUG= R=alokp@chromium.org Review URL: https://codereview.appspot.com/13568048
parent 2b6008c9
......@@ -23,16 +23,9 @@ protected:
{
memset(&resources, 0, sizeof(resources));
ASSERT_TRUE(ShInitialize() != 0) << "Could not ShInitialize";
GenerateResources(&resources);
}
virtual void TearDown()
{
ASSERT_TRUE(ShFinalize() != 0);
}
// Set up the per compile resources
void GenerateResources(ShBuiltInResources* resources)
{
......
//
// Copyright (c) 2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "GLSLANG/ShaderLang.h"
int main(int argc, char** argv)
{
testing::InitGoogleMock(&argc, argv);
ShInitialize();
int rt = RUN_ALL_TESTS();
ShFinalize();
return rt;
}
//
// Copyright (c) 2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
#include "gmock/gmock.h"
#include "gtest/gtest.h"
int main(int argc, char** argv)
{
testing::InitGoogleMock(&argc, argv);
int rt = RUN_ALL_TESTS();
return rt;
}
......@@ -51,7 +51,6 @@
],
'sources':
[
'third_party/googlemock/src/gmock_main.cc',
'<!@(python enumerate_files.py preprocessor_tests -types *.cpp *.h)'
],
},
......@@ -74,7 +73,6 @@
],
'sources':
[
'third_party/googlemock/src/gmock_main.cc',
'<!@(python enumerate_files.py compiler_tests -types *.cpp *.h)'
],
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment