Files
angle/tests/angle_unittests_main.cpp
Kenneth Russell 2609bf4ca4 Refactored test targets into angle_unittests and angle_end2end_tests.
angle_unittests subsumes the previous:
  angle_compiler_tests
  angle_preprocessor_tests
and will subsume angle_implementation_unit_tests in a follow-on CL.

angle_end2end_tests subsumes the previous:
  angle_tests
  angle_standalone_tests
  angle_implementation_unit_tests

The bulk of these two targets have been factored into their own
.gypi files, so that a different main.cpp can be trivially
plugged in for the gtest harness. This refactoring has been
tested both in ANGLE standalone builds, and builds within
Chromium.

BUG=chromium:435726

Change-Id: I231a3c1989c17e188cc469dcf80fe78b052afe78
Reviewed-on: https://chromium-review.googlesource.com/236681
Reviewed-by: Jamie Madill <[email protected]>
Tested-by: Kenneth Russell <[email protected]>
2014-12-19 22:13:09 +00:00

37 lines
800 B
C++

//
// 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 "gtest/gtest.h"
#include "GLSLANG/ShaderLang.h"
class CompilerTestEnvironment : public testing::Environment
{
public:
virtual void SetUp()
{
if (!ShInitialize())
{
FAIL() << "Failed to initialize the compiler.";
}
}
virtual void TearDown()
{
if (!ShFinalize())
{
FAIL() << "Failed to finalize the compiler.";
}
}
};
int main(int argc, char** argv)
{
testing::InitGoogleTest(&argc, argv);
testing::AddGlobalTestEnvironment(new CompilerTestEnvironment());
int rt = RUN_ALL_TESTS();
return rt;
}