1.Android.bp
cc_test {
name: "gtest_01",
shared_libs: [
"libbase",
"liblog",
"libmedia_helper",
"libutils",
"libxml2",
],
srcs: ["gtest_01.cpp"],
}
2.gtest_01.cpp
#include <gtest/gtest.h>
#include <log/log.h>
TEST(test1, test2) {
printf("xxx------------->%s(), line = %dn",__FUNCTION__,__LINE__);
ALOGE("xxx------------->%s(), line = %d",__FUNCTION__,__LINE__);
}
TEST(test3, test4) {
printf("xxx------------->%s(), line = %dn",__FUNCTION__,__LINE__);
ALOGE("xxx------------->%s(), line = %d",__FUNCTION__,__LINE__);
}
最后
以上就是粗犷汽车最近收集整理的关于Android12之gtest测试示例的全部内容,更多相关Android12之gtest测试示例内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复