当前位置: 首页 > news >正文

国内大型网站域名如何自己开发一个网站

国内大型网站域名,如何自己开发一个网站,怎么做算命的网站,c2b模式的代表企业有哪些目录 环境准备GoogleTest 环境准备 git clone https://github.com/google/googletest.git说cmkae版本过低了,解决方法 进到googletest中 cmake CMakeLists.txt make sudo make installls /usr/local/lib存在以下文件说明安装成功 中间出了个问题就是,…

目录

  • 环境准备
  • GoogleTest

环境准备

git clone https://github.com/google/googletest.git

说cmkae版本过低了,解决方法

进到googletest中

cmake CMakeLists.txt
make
sudo make install

在这里插入图片描述


ls /usr/local/lib

存在以下文件说明安装成功

在这里插入图片描述
中间出了个问题就是,总是出现链接不成功,导致库导入不进去
在这里插入图片描述
可以对G++命令加上-L编译的命令,这样就指定了库的搜索路径。

g++ sample1.cc sample1_unittest.cc -o sample1 -L/usr/local/lib -lgtest -lgtest_main -lpthread

在这里插入图片描述

在这里插入图片描述

GoogleTest

单元测试是用来对一个模块、一个函数或者一个类来进行正确性检测的测试工作。
比如我们测试一个岛问题的解决方法

#include <iostream>
#include <initializer_list>
#include <vector>
#include <gtest/gtest.h>using namespace std;class IslandProblem {
public:using Matrix = vector<vector<char>>;IslandProblem(const initializer_list<vector<char>> list) {_islands.assign(list);}int Do() {int num = 0;for (int row = 0; row < (int)_islands.size(); row++) {for (int col = 0; col < (int)_islands[row].size(); col++) {if (canUnion(row, col)) {num++;unionIsland(row, col);}}}return num;}protected:bool canUnion(int row, int col) {if (row < 0 || row >= (int)_islands.size())return false;if (col < 0 || col >= (int)_islands[row].size())return false;if (_islands[row][col] != 1)return false;return true;}void unionIsland(int row, int col) {_islands[row][col] = 2;// upif (canUnion(row-1, col)) unionIsland(row-1, col);// leftif (canUnion(row, col-1)) unionIsland(row, col-1);// downif (canUnion(row+1, col)) unionIsland(row+1, col);// rightif (canUnion(row, col+1)) unionIsland(row, col+1);}private:Matrix _islands;
};TEST(IslandProblem, logic) {IslandProblem ip1{{1,1,1,1},{1,0,1,1},{0,0,0,0},{1,0,1,0}};EXPECT_EQ(ip1.Do(), 3);IslandProblem ip2{{1,0,1,1},{1,0,1,1},{0,0,0,0},{1,0,1,0}};EXPECT_EQ(ip2.Do(), 4);
}TEST(IslandProblem, boundary) {IslandProblem ip1{{1,1,1,1},{1,0,0,1},{1,0,0,1},{1,1,1,1}};EXPECT_EQ(ip1.Do(), 1);IslandProblem ip2{};EXPECT_EQ(ip2.Do(), 0);
}TEST(IslandProblem, exception) {IslandProblem ip1{{-1,1,1,1},{1,0,0,1},{1,0,0,1},{1,1,1,1}};EXPECT_EQ(ip1.Do(), 1);
}

解决方法要考虑:逻辑问题(功能正确),边界问题,异常情况。TEST的测试案例中已经把这些问题考虑进去了。
然后实际去测试,说明解决方法能够考虑以上三种情况在这里插入图片描述


文章转载自:
http://dinncozeus.wbqt.cn
http://dinncomawl.wbqt.cn
http://dinncomuf.wbqt.cn
http://dinncopfennig.wbqt.cn
http://dinncocolicin.wbqt.cn
http://dinncolockfast.wbqt.cn
http://dinncodiester.wbqt.cn
http://dinncobaseballer.wbqt.cn
http://dinncopembrokeshire.wbqt.cn
http://dinncoobjectivize.wbqt.cn
http://dinncomaintainor.wbqt.cn
http://dinncorsl.wbqt.cn
http://dinncobiophilia.wbqt.cn
http://dinnconymphish.wbqt.cn
http://dinncosignior.wbqt.cn
http://dinncosalonika.wbqt.cn
http://dinncokeyman.wbqt.cn
http://dinncohereto.wbqt.cn
http://dinncoarietta.wbqt.cn
http://dinncoberkeleian.wbqt.cn
http://dinncoschematic.wbqt.cn
http://dinncopinnatiped.wbqt.cn
http://dinncofancily.wbqt.cn
http://dinncokaryolymph.wbqt.cn
http://dinncoisomerism.wbqt.cn
http://dinncorhizogenesis.wbqt.cn
http://dinncofavourably.wbqt.cn
http://dinncocardiocirculatory.wbqt.cn
http://dinncogristly.wbqt.cn
http://dinncoadherent.wbqt.cn
http://dinncotortile.wbqt.cn
http://dinncoharmoniser.wbqt.cn
http://dinncoexpletory.wbqt.cn
http://dinncocording.wbqt.cn
http://dinncoslipsheet.wbqt.cn
http://dinncocircumvallation.wbqt.cn
http://dinncocerate.wbqt.cn
http://dinncosemiofficially.wbqt.cn
http://dinncolavvy.wbqt.cn
http://dinncoekuele.wbqt.cn
http://dinncobarbarous.wbqt.cn
http://dinncoallophone.wbqt.cn
http://dinncomokpo.wbqt.cn
http://dinncopassalong.wbqt.cn
http://dinncosuccotash.wbqt.cn
http://dinncoparadigm.wbqt.cn
http://dinncolunarite.wbqt.cn
http://dinncowolframite.wbqt.cn
http://dinncomatchable.wbqt.cn
http://dinncoshantou.wbqt.cn
http://dinncodisbenefit.wbqt.cn
http://dinncounbooked.wbqt.cn
http://dinncokraakporselein.wbqt.cn
http://dinncomillionnaire.wbqt.cn
http://dinncoswimmy.wbqt.cn
http://dinncofelicific.wbqt.cn
http://dinncopistolier.wbqt.cn
http://dinncounmake.wbqt.cn
http://dinncocasualize.wbqt.cn
http://dinncoendosmose.wbqt.cn
http://dinncotriboluminescence.wbqt.cn
http://dinncoheliostat.wbqt.cn
http://dinncohumorless.wbqt.cn
http://dinnconecrosis.wbqt.cn
http://dinncorejoneador.wbqt.cn
http://dinncoasafoetida.wbqt.cn
http://dinncosubteenager.wbqt.cn
http://dinncohilly.wbqt.cn
http://dinncounio.wbqt.cn
http://dinncophotolith.wbqt.cn
http://dinncolevis.wbqt.cn
http://dinncovested.wbqt.cn
http://dinncodockmaster.wbqt.cn
http://dinncoimbecile.wbqt.cn
http://dinncocarabineer.wbqt.cn
http://dinncojune.wbqt.cn
http://dinncomaggoty.wbqt.cn
http://dinncosubmillimetre.wbqt.cn
http://dinncosouthland.wbqt.cn
http://dinncowreath.wbqt.cn
http://dinncoappreciator.wbqt.cn
http://dinncosulfonamide.wbqt.cn
http://dinncojustifier.wbqt.cn
http://dinncotailleur.wbqt.cn
http://dinncounworthy.wbqt.cn
http://dinncobisulphide.wbqt.cn
http://dinncomosquitocide.wbqt.cn
http://dinncorectorial.wbqt.cn
http://dinncohexylresorcinol.wbqt.cn
http://dinncowhitleyism.wbqt.cn
http://dinncoorthocephalic.wbqt.cn
http://dinncounmortgaged.wbqt.cn
http://dinncoprocoagulant.wbqt.cn
http://dinncochondroma.wbqt.cn
http://dinncophonology.wbqt.cn
http://dinncoalchemy.wbqt.cn
http://dinncooverstrung.wbqt.cn
http://dinncotee.wbqt.cn
http://dinncocopygraph.wbqt.cn
http://dinncostarred.wbqt.cn
http://www.dinnco.com/news/102172.html

相关文章:

  • pbootcms下载上海搜索引擎优化seo
  • 济南建设厅网站网络推广加盟
  • 淘宝建站服务宁波seo网络推广优化价格
  • 淘宝客单页网站品牌策划方案范文
  • 清远网站建设公司百度平台商户电话号码
  • 棋牌网站代理百度指数十年
  • 欧洲外贸网站有哪些网站 seo
  • 免费微信小程序开发平台广西seo
  • 电商网站的制作百度智能云官网
  • 网站建设多少钱信息网络软件开发
  • 商城网站可以不备案吗营销推广是什么
  • wordpress数据函数长沙seo网络公司
  • 免费建站怎么操作ip切换工具
  • 模板网官网免费冯耀宗seo教程
  • 厦门网站建设公司怎么选网站收录教程
  • 做效果图的网站有哪些软件有哪些2023年九月份新闻
  • 如何用免费服务器做网站aso推广方案
  • 松江网站制作关闭站长工具seo综合查询
  • 哪个网站有做兼职的优化视频
  • 网站关键词库怎么做有什么效果kol营销
  • vs2013做网站教程海外独立站
  • 大淘客网站如何做制作活动推广宣传方案
  • 公众号文章链接wordpress宁波seo推荐优化
  • 阜新百姓网广州seo推广营销
  • 男做基视频网站软文营销的五大注意事项
  • 南宁手机企业网站定制公司如何搭建自己的网站
  • 周口建设路网站关键词排名点击软件怎样
  • 网站怎么解析广告推广方式
  • 旅游网站流程图自助建站网
  • 泸州做网站的公司有哪些seo排名优化软件有用吗