提交 ce49380d 编写于 作者: S shichong

add testcase

Signed-off-by: Nshichong <shichong@kaihongdigi.com>
上级 49fe98aa
/*
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <gtest/gtest.h>
#include "../Khrgles31BaseFunc.h"
#include "../ActsKhrgles310001TestSuite.h"
using namespace std;
using namespace testing::ext;
using namespace OHOS;
static HWTEST_F(ActsKhrgles310001TestSuite, TestCase_000002, Function | MediumTest | Level2)
{
GTEST_LOG_(INFO) << "TestCase_000002 start";
int argc = 3;
const char *argv[3] = {
".",
"--deqp-case="
"KHR-GLES31.core.texture_storage_multisample.APIGLTexStorage2DMult"
"isample.multisample_texture_tex_storage_2d_general_samples_number",
"--deqp-archive-dir=/data/local/tmp/"
};
FuncRunResult result = RunTestKHRGLES(argc, argv);
ActsKhrgles310001TestSuite::runResult.numPassed += result.numPassed;
ActsKhrgles310001TestSuite::runResult.numFailed += result.numFailed;
ActsKhrgles310001TestSuite::runResult.numNotSupported += result.numNotSupported;
ActsKhrgles310001TestSuite::runResult.numWarnings += result.numWarnings;
ActsKhrgles310001TestSuite::runResult.numWaived += result.numWaived;
if (result.numNotSupported == 1) {
GTEST_LOG_(INFO) << "TestCase_000002 notsupport!";
} else if (result.isComplete) {
EXPECT_TRUE(result.isComplete);
EXPECT_TRUE(result.numPassed == 1);
};
GTEST_LOG_(INFO) << "TestCase_000002 end";
}
static HWTEST_F(ActsKhrgles310001TestSuite, TestCase_000003, Function | MediumTest | Level2)
{
GTEST_LOG_(INFO) << "TestCase_000003 start";
int argc = 3;
const char *argv[3] = {
".",
"--deqp-case="
"KHR-GLES31.core.texture_storage_multisample.APIGLTexStorage2DMultisample"
".multisample_texture_tex_storage_2d_invalid_and_border_case_texture_sizes",
"--deqp-archive-dir=/data/local/tmp/"
};
FuncRunResult result = RunTestKHRGLES(argc, argv);
ActsKhrgles310001TestSuite::runResult.numPassed += result.numPassed;
ActsKhrgles310001TestSuite::runResult.numFailed += result.numFailed;
ActsKhrgles310001TestSuite::runResult.numNotSupported += result.numNotSupported;
ActsKhrgles310001TestSuite::runResult.numWarnings += result.numWarnings;
ActsKhrgles310001TestSuite::runResult.numWaived += result.numWaived;
if (result.numNotSupported == 1) {
GTEST_LOG_(INFO) << "TestCase_000003 notsupport!";
} else if (result.isComplete) {
EXPECT_TRUE(result.isComplete);
EXPECT_TRUE(result.numPassed == 1);
};
GTEST_LOG_(INFO) << "TestCase_000003 end";
}
static HWTEST_F(ActsKhrgles310001TestSuite, TestCase_000004, Function | MediumTest | Level2)
{
GTEST_LOG_(INFO) << "TestCase_000004 start";
int argc = 3;
const char *argv[3] = {
".",
"--deqp-case="
"KHR-GLES31.core.texture_storage_multisample.APIGLTexStorage2DMultisample.multisa"
"mple_texture_tex_storage_2d_non_color_depth_or_stencil_internal_formats_rejected",
"--deqp-archive-dir=/data/local/tmp/"
};
FuncRunResult result = RunTestKHRGLES(argc, argv);
ActsKhrgles310001TestSuite::runResult.numPassed += result.numPassed;
ActsKhrgles310001TestSuite::runResult.numFailed += result.numFailed;
ActsKhrgles310001TestSuite::runResult.numNotSupported += result.numNotSupported;
ActsKhrgles310001TestSuite::runResult.numWarnings += result.numWarnings;
ActsKhrgles310001TestSuite::runResult.numWaived += result.numWaived;
if (result.numNotSupported == 1) {
GTEST_LOG_(INFO) << "TestCase_000004 notsupport!";
} else if (result.isComplete) {
EXPECT_TRUE(result.isComplete);
EXPECT_TRUE(result.numPassed == 1);
};
GTEST_LOG_(INFO) << "TestCase_000004 end";
}
static HWTEST_F(ActsKhrgles310001TestSuite, TestCase_000005, Function | MediumTest | Level2)
{
GTEST_LOG_(INFO) << "TestCase_000005 start";
int argc = 3;
const char *argv[3] = {
".",
"--deqp-case="
"KHR-GLES31.core.texture_storage_multisample.APIGLTexStorage2DMulti"
"sample.multisample_texture_tex_storage_2d_reconfiguration_rejected",
"--deqp-archive-dir=/data/local/tmp/"
};
FuncRunResult result = RunTestKHRGLES(argc, argv);
ActsKhrgles310001TestSuite::runResult.numPassed += result.numPassed;
ActsKhrgles310001TestSuite::runResult.numFailed += result.numFailed;
ActsKhrgles310001TestSuite::runResult.numNotSupported += result.numNotSupported;
ActsKhrgles310001TestSuite::runResult.numWarnings += result.numWarnings;
ActsKhrgles310001TestSuite::runResult.numWaived += result.numWaived;
if (result.numNotSupported == 1) {
GTEST_LOG_(INFO) << "TestCase_000005 notsupport!";
} else if (result.isComplete) {
EXPECT_TRUE(result.isComplete);
EXPECT_TRUE(result.numPassed == 1);
};
GTEST_LOG_(INFO) << "TestCase_000005 end";
}
static HWTEST_F(ActsKhrgles310001TestSuite, TestCase_000006, Function | MediumTest | Level2)
{
GTEST_LOG_(INFO) << "TestCase_000006 start";
int argc = 3;
const char *argv[3] = {
".",
"--deqp-case="
"KHR-GLES31.core.texture_storage_multisample.APIGLTexStorage2DMultis"
"ample.multisample_texture_tex_storage_2d_texture_2d_multsample_array",
"--deqp-archive-dir=/data/local/tmp/"
};
FuncRunResult result = RunTestKHRGLES(argc, argv);
ActsKhrgles310001TestSuite::runResult.numPassed += result.numPassed;
ActsKhrgles310001TestSuite::runResult.numFailed += result.numFailed;
ActsKhrgles310001TestSuite::runResult.numNotSupported += result.numNotSupported;
ActsKhrgles310001TestSuite::runResult.numWarnings += result.numWarnings;
ActsKhrgles310001TestSuite::runResult.numWaived += result.numWaived;
if (result.numNotSupported == 1) {
GTEST_LOG_(INFO) << "TestCase_000006 notsupport!";
} else if (result.isComplete) {
EXPECT_TRUE(result.isComplete);
EXPECT_TRUE(result.numPassed == 1);
};
GTEST_LOG_(INFO) << "TestCase_000006 end";
}
static HWTEST_F(ActsKhrgles310001TestSuite, TestCase_000007, Function | MediumTest | Level2)
{
GTEST_LOG_(INFO) << "TestCase_000007 start";
int argc = 3;
const char *argv[3] = {
".",
"--deqp-case="
"KHR-GLES31.core.texture_storage_multisample.APIGLTexStorage2DMultisample.multisa"
"mple_texture_tex_storage_2d_unsupported_samples_count_for_color_textures_rejected",
"--deqp-archive-dir=/data/local/tmp/"
};
FuncRunResult result = RunTestKHRGLES(argc, argv);
ActsKhrgles310001TestSuite::runResult.numPassed += result.numPassed;
ActsKhrgles310001TestSuite::runResult.numFailed += result.numFailed;
ActsKhrgles310001TestSuite::runResult.numNotSupported += result.numNotSupported;
ActsKhrgles310001TestSuite::runResult.numWarnings += result.numWarnings;
ActsKhrgles310001TestSuite::runResult.numWaived += result.numWaived;
if (result.numNotSupported == 1) {
GTEST_LOG_(INFO) << "TestCase_000007 notsupport!";
} else if (result.isComplete) {
EXPECT_TRUE(result.isComplete);
EXPECT_TRUE(result.numPassed == 1);
};
GTEST_LOG_(INFO) << "TestCase_000007 end";
}
static HWTEST_F(ActsKhrgles310001TestSuite, TestCase_000008, Function | MediumTest | Level2)
{
GTEST_LOG_(INFO) << "TestCase_000008 start";
int argc = 3;
const char *argv[3] = {
".",
"--deqp-case="
"KHR-GLES31.core.texture_storage_multisample.APIGLTexStorage2DMultisample.multisa"
"mple_texture_tex_storage_2d_unsupported_samples_count_for_depth_textures_rejected",
"--deqp-archive-dir=/data/local/tmp/"
};
FuncRunResult result = RunTestKHRGLES(argc, argv);
ActsKhrgles310001TestSuite::runResult.numPassed += result.numPassed;
ActsKhrgles310001TestSuite::runResult.numFailed += result.numFailed;
ActsKhrgles310001TestSuite::runResult.numNotSupported += result.numNotSupported;
ActsKhrgles310001TestSuite::runResult.numWarnings += result.numWarnings;
ActsKhrgles310001TestSuite::runResult.numWaived += result.numWaived;
if (result.numNotSupported == 1) {
GTEST_LOG_(INFO) << "TestCase_000008 notsupport!";
} else if (result.isComplete) {
EXPECT_TRUE(result.isComplete);
EXPECT_TRUE(result.numPassed == 1);
};
GTEST_LOG_(INFO) << "TestCase_000008 end";
}
static HWTEST_F(ActsKhrgles310001TestSuite, TestCase_000009, Function | MediumTest | Level2)
{
GTEST_LOG_(INFO) << "TestCase_000009 start";
int argc = 3;
const char *argv[3] = {
".",
"--deqp-case="
"KHR-GLES31.core.texture_storage_multisample.APIGLTexStorage2DMultisample.multisample"
"_texture_tex_storage_2d_unsupported_samples_count_for_depth_stencil_textures_rejected",
"--deqp-archive-dir=/data/local/tmp/"
};
FuncRunResult result = RunTestKHRGLES(argc, argv);
ActsKhrgles310001TestSuite::runResult.numPassed += result.numPassed;
ActsKhrgles310001TestSuite::runResult.numFailed += result.numFailed;
ActsKhrgles310001TestSuite::runResult.numNotSupported += result.numNotSupported;
ActsKhrgles310001TestSuite::runResult.numWarnings += result.numWarnings;
ActsKhrgles310001TestSuite::runResult.numWaived += result.numWaived;
if (result.numNotSupported == 1) {
GTEST_LOG_(INFO) << "TestCase_000009 notsupport!";
} else if (result.isComplete) {
EXPECT_TRUE(result.isComplete);
EXPECT_TRUE(result.numPassed == 1);
};
GTEST_LOG_(INFO) << "TestCase_000009 end";
}
static HWTEST_F(ActsKhrgles310001TestSuite, TestCase_000010, Function | MediumTest | Level2)
{
GTEST_LOG_(INFO) << "TestCase_000010 start";
int argc = 3;
const char *argv[3] = {
".",
"--deqp-case="
"KHR-GLES31.core.texture_storage_multisample.APIGLTexStorage"
"2DMultisample.multisample_texture_tex_storage_2d_valid_calls",
"--deqp-archive-dir=/data/local/tmp/"
};
FuncRunResult result = RunTestKHRGLES(argc, argv);
ActsKhrgles310001TestSuite::runResult.numPassed += result.numPassed;
ActsKhrgles310001TestSuite::runResult.numFailed += result.numFailed;
ActsKhrgles310001TestSuite::runResult.numNotSupported += result.numNotSupported;
ActsKhrgles310001TestSuite::runResult.numWarnings += result.numWarnings;
ActsKhrgles310001TestSuite::runResult.numWaived += result.numWaived;
if (result.numNotSupported == 1) {
GTEST_LOG_(INFO) << "TestCase_000010 notsupport!";
} else if (result.isComplete) {
EXPECT_TRUE(result.isComplete);
EXPECT_TRUE(result.numPassed == 1);
};
GTEST_LOG_(INFO) << "TestCase_000010 end";
}
static HWTEST_F(ActsKhrgles310001TestSuite, TestCase_000011, Function | MediumTest | Level2)
{
GTEST_LOG_(INFO) << "TestCase_000011 start";
int argc = 3;
const char *argv[3] = {
".",
"--deqp-case="
"KHR-GLES31.core.texture_storage_multisample.APIGLTexStorage"
"2DMultisample.multisample_texture_tex_storage_2d_zero_sample",
"--deqp-archive-dir=/data/local/tmp/"
};
FuncRunResult result = RunTestKHRGLES(argc, argv);
ActsKhrgles310001TestSuite::runResult.numPassed += result.numPassed;
ActsKhrgles310001TestSuite::runResult.numFailed += result.numFailed;
ActsKhrgles310001TestSuite::runResult.numNotSupported += result.numNotSupported;
ActsKhrgles310001TestSuite::runResult.numWarnings += result.numWarnings;
ActsKhrgles310001TestSuite::runResult.numWaived += result.numWaived;
if (result.numNotSupported == 1) {
GTEST_LOG_(INFO) << "TestCase_000011 notsupport!";
} else if (result.isComplete) {
EXPECT_TRUE(result.isComplete);
EXPECT_TRUE(result.numPassed == 1);
};
GTEST_LOG_(INFO) << "TestCase_000011 end";
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册