• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2013 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 
7 #include "GLSLANG/ShaderLang.h"
8 #include "gtest/gtest.h"
9 #include "test_utils/runner/TestSuite.h"
10 
11 class CompilerTestEnvironment : public testing::Environment
12 {
13   public:
SetUp()14     void SetUp() override
15     {
16         if (!sh::Initialize())
17         {
18             FAIL() << "Failed to initialize the compiler.";
19         }
20     }
21 
TearDown()22     void TearDown() override
23     {
24         if (!sh::Finalize())
25         {
26             FAIL() << "Failed to finalize the compiler.";
27         }
28     }
29 };
30 
main(int argc,char ** argv)31 int main(int argc, char **argv)
32 {
33     angle::TestSuite testSuite(&argc, argv);
34     testing::AddGlobalTestEnvironment(new CompilerTestEnvironment());
35     return testSuite.run();
36 }
37