diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-08-16 13:18:57 +0100 | 
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-08-16 13:18:57 +0100 | 
| commit | 1dc3df5c8b791267f258981c67f0b34be7da56e0 (patch) | |
| tree | e7fa53287b1bfd2ed3714b42b781ea72c71a6965 | |
| parent | Don't pass temporary string to TestRequest (diff) | |
| download | gentoobrowse-1dc3df5c8b791267f258981c67f0b34be7da56e0.tar.bz2 gentoobrowse-1dc3df5c8b791267f258981c67f0b34be7da56e0.tar.xz gentoobrowse-1dc3df5c8b791267f258981c67f0b34be7da56e0.zip | |
Reformat with new clang-format
| -rw-r--r-- | gentoobrowse/src/packages.cpp | 4 | ||||
| -rw-r--r-- | gentoobrowse/src/test.cpp | 8 | 
2 files changed, 11 insertions, 1 deletions
| diff --git a/gentoobrowse/src/packages.cpp b/gentoobrowse/src/packages.cpp index bee3c98..36d7319 100644 --- a/gentoobrowse/src/packages.cpp +++ b/gentoobrowse/src/packages.cpp @@ -78,8 +78,9 @@ namespace GentooBrowse {  						auto & s = _responseModel->syncs[ebuild->firstseen.substr(0, 10)];  						bool isTracked = std::find(tracked.begin(), tracked.end(), p->packageid) != tracked.end();  						auto & pw = s[{isTracked, c->name}][{isTracked, p->name}]; -						if (!pw.detail) +						if (!pw.detail) {  							pw.detail = p; +						}  						pw.ebuilds.push_back(ebuild);  					}  				} @@ -195,6 +196,7 @@ namespace GentooBrowse {  				return p->categoryid;  			});  		} +  		const Gentoo::PortagePrxPtr prx0;  		const Gentoo::UsersPrxPtr prx1;  		const ::Ice::Int _pi_category; diff --git a/gentoobrowse/src/test.cpp b/gentoobrowse/src/test.cpp index 63c34d4..dccdeaf 100644 --- a/gentoobrowse/src/test.cpp +++ b/gentoobrowse/src/test.cpp @@ -17,11 +17,13 @@ streamGet(void * s)  {  	return reinterpret_cast<std::istream *>(s)->get();  } +  void  streamUnget(void * s, unsigned char ch)  {  	reinterpret_cast<std::istream *>(s)->putback(ch);  } +  Bool  streamEof(void * s)  { @@ -37,6 +39,7 @@ public:  		hdr["Accept-Encoding"] = "gzip, deflate, sdch";  		hdr["Accept-Language"] = "en-GB,en;q=0.8";  	} +  	auto  	getOutputPath(const char * name, const char * ext)  	{ @@ -45,6 +48,7 @@ public:  		return (binDir / realname.get()).replace_extension(ext);  	}  }; +  template<typename T = void> class ChromiumRequestT : public ChromiumRequest {  	using ChromiumRequest::ChromiumRequest; @@ -100,6 +104,7 @@ public:  	standardAssertions(const char * name) override  	{  		auto p = std::make_unique<xmlpp::DomParser>(); +  		BOOST_TEST_CONTEXT(__FUNCTION__ << " : " << name) {  			auto h = getResponseHeaders();  			BOOST_REQUIRE_EQUAL(h["Status"], "200 OK"); @@ -108,6 +113,7 @@ public:  			p->parse_stream(this->output);  			p->get_document()->write_to_file_formatted(getOutputPath(name, ".xml"));  		} +  		return p;  	} @@ -141,6 +147,7 @@ public:  	standardAssertions(const char * name) override  	{  		auto p = std::make_unique<xmlpp::DomParser>(); +  		BOOST_TEST_CONTEXT(__FUNCTION__ << " : " << name) {  			auto h = getResponseHeaders();  			BOOST_REQUIRE_EQUAL(h["Status"], "200 OK"); @@ -149,6 +156,7 @@ public:  			p->parse_stream(this->output);  			p->get_document()->write_to_file_formatted(getOutputPath(name, ".xml"));  		} +  		return p;  	}  }; | 
