mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-30 18:38:52 +00:00
add test case to buffer test suite
git-svn-id: svn+q:///qpdf/trunk@1038 71b93d88-0707-0410-a8cf-f5a4172ac649
This commit is contained in:
parent
df1fa5291c
commit
de05cfb508
@ -2,6 +2,7 @@
|
||||
#include <qpdf/Pl_Count.hh>
|
||||
#include <qpdf/Pl_Discard.hh>
|
||||
#include <stdlib.h>
|
||||
#include <stdexcept>
|
||||
|
||||
typedef unsigned char* uc;
|
||||
|
||||
@ -49,6 +50,14 @@ int main()
|
||||
std::cout << "size: " << b->getSize() << std::endl;
|
||||
std::cout << "data: " << b->getBuffer() << std::endl;
|
||||
delete b;
|
||||
|
||||
unsigned char lbuf[10];
|
||||
Buffer b1(lbuf, 10);
|
||||
if (! ((b1.getBuffer() == lbuf) &&
|
||||
(b1.getSize() == 10)))
|
||||
{
|
||||
throw std::logic_error("hand-created buffer is not as expected");
|
||||
}
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user