Flutter Engine
The Flutter Engine
formats_gles_unittests.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "flutter/testing/testing.h" // IWYU pragma: keep
6#include "gtest/gtest.h"
8
9namespace impeller {
10namespace testing {
11
12TEST(FormatsGLES, CanFormatFramebufferErrorMessage) {
13 ASSERT_EQ(DebugToFramebufferError(GL_FRAMEBUFFER_UNDEFINED),
14 "GL_FRAMEBUFFER_UNDEFINED");
15 ASSERT_EQ(DebugToFramebufferError(GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT),
16 "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT");
17 ASSERT_EQ(
18 DebugToFramebufferError(GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT),
19 "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT");
20 ASSERT_EQ(DebugToFramebufferError(GL_FRAMEBUFFER_UNSUPPORTED),
21 "GL_FRAMEBUFFER_UNSUPPORTED");
22 ASSERT_EQ(DebugToFramebufferError(GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE),
23 "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE");
24 ASSERT_EQ(DebugToFramebufferError(0), "Unknown error code: 0");
25}
26
27} // namespace testing
28} // namespace impeller
TEST(AiksCanvasTest, EmptyCullRect)
std::string DebugToFramebufferError(int status)
Definition: formats_gles.cc:9