Blender V5.3
libocio_fallback_config_test.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2026 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#include "testing/testing.h"
6
7#include "CLG_log.h"
8
9#include "OCIO_config.hh"
10
11#include "libocio_config.hh"
12
13namespace blender::ocio {
14
15class ocio_fallback_config : public testing::Test {
16 public:
17 static void SetUpTestSuite()
18 {
19 CLG_init();
20 }
21
22 static void TearDownTestSuite()
23 {
24 CLG_exit();
25 }
26};
27
28TEST_F(ocio_fallback_config, loads_and_validates)
29{
30 std::unique_ptr<Config> config = Config::create_fallback();
31 ASSERT_NE(config, nullptr);
32
33 /* Strict OpenColorIO validation, which loading alone does not do. */
34 EXPECT_NO_THROW(static_cast<LibOCIOConfig &>(*config).get_ocio_config()->validate());
35}
36
37} // namespace blender::ocio
void CLG_exit()
Definition clog.cc:877
void CLG_init()
Definition clog.cc:870
static std::unique_ptr< Config > create_fallback()
Definition config.cc:16
const OCIO_NAMESPACE::ConstConfigRcPtr & get_ocio_config() const
TEST_F(ocio_fallback_config, loads_and_validates)