blob: 0ee654929b3b4e3d3c3b988e00008926da087252 [file] [log] [blame]
Nader Jawad086645d2021-09-24 13:42:47 -07001/*
2 * Copyright (C) 2021 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include <gtest/gtest.h>
18#include "renderthread/RenderEffectCapabilityQuery.h"
19#include "tests/common/TestContext.h"
20
21TEST(RenderEffectCapabilityQuery, testSupportedVendor) {
22 ASSERT_TRUE(supportsRenderEffectCache("Google", "OpenGL ES 1.4 V@0.0"));
23}
24
25TEST(RenderEffectCapabilityQuery, testSupportedVendorWithDifferentVersion) {
26 ASSERT_TRUE(supportsRenderEffectCache("Google", "OpenGL ES 1.3 V@571.0"));
27}
28
29TEST(RenderEffectCapabilityQuery, testVendorWithSupportedVersion) {
30 ASSERT_TRUE(supportsRenderEffectCache("Qualcomm", "OpenGL ES 1.5 V@571.0"));
31}
32
33TEST(RenderEffectCapabilityQuery, testVendorWithSupportedPatchVersion) {
34 ASSERT_TRUE(supportsRenderEffectCache("Qualcomm", "OpenGL ES 1.5 V@571.1"));
35}
36
37TEST(RenderEffectCapabilityQuery, testVendorWithNewerThanSupportedMajorVersion) {
38 ASSERT_TRUE(supportsRenderEffectCache("Qualcomm", "OpenGL ES 1.5 V@572.0"));
39}
40
41TEST(RenderEffectCapabilityQuery, testVendorWithNewerThanSupportedMinorVersion) {
42 ASSERT_TRUE(supportsRenderEffectCache("Qualcomm", "OpenGL ES 1.5 V@571.2"));
43}
44
45TEST(RenderEffectCapabilityQuery, testVendorWithUnsupportedMajorVersion) {
46 ASSERT_FALSE(supportsRenderEffectCache("Qualcomm", "OpenGL ES 1.0 V@570.1"));
47}
48
49TEST(RenderEffectCapabilityQuery, testVendorWithUnsupportedVersion) {
50 ASSERT_FALSE(supportsRenderEffectCache("Qualcomm", "OpenGL ES 1.1 V@570.0"));
51}
52