mirror of
				https://github.com/pocoproject/poco.git
				synced 2025-10-30 13:47:10 +01:00 
			
		
		
		
	cookie age test fix
This commit is contained in:
		| @@ -113,6 +113,7 @@ void HTTPCookieTest::testUnescape() | ||||
| 	assert (unescaped == "\n\t@,;\"'"); | ||||
| } | ||||
|  | ||||
|  | ||||
| void HTTPCookieTest::testExpiryFuture() | ||||
| { | ||||
| 	DateTime future; | ||||
| @@ -128,6 +129,7 @@ void HTTPCookieTest::testExpiryFuture() | ||||
| 	testCookieExpiry(future); | ||||
| } | ||||
|  | ||||
|  | ||||
| void HTTPCookieTest::testExpiryPast() | ||||
| { | ||||
| 	DateTime past; | ||||
| @@ -143,7 +145,9 @@ void HTTPCookieTest::testExpiryPast() | ||||
| 	testCookieExpiry(past); | ||||
| } | ||||
|  | ||||
| void HTTPCookieTest::testCookieExpiry(DateTime expiryTime){ | ||||
|  | ||||
| void HTTPCookieTest::testCookieExpiry(DateTime expiryTime) | ||||
| { | ||||
| 	NameValueCollection nvc; | ||||
| 	nvc.add("name", "value"); | ||||
| 	std::string expiryString = DateTimeFormatter::format(expiryTime.timestamp(),DateTimeFormat::HTTP_FORMAT); | ||||
| @@ -181,7 +185,7 @@ void HTTPCookieTest::testCookieExpiry(DateTime expiryTime){ | ||||
| 	//assert that the cookie's max age is the number of seconds between | ||||
| 	//the creation of the cookie and the expiry time passed to its | ||||
| 	//constuctor, within a delta of the lifetime of the cookie | ||||
| 	assert (abs(cookieMaxAge - expectedMaxAge) <= delta.seconds()); | ||||
| 	assert (cookieMaxAge - expectedMaxAge <= delta.seconds()); | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Aleksandar Fabijanic
					Aleksandar Fabijanic