/** * tests/test_printExampleBackendXML/test_printExampleBackendXML.cpp * Part of the NV Virtual Buffer Library * This library is copyright 2007, 2008 NV Virtual Buffer Library Contributors * This library is licensed under the GNU Lesser General Public Licence. See license.txt which is included with this library, or see * http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html */ #include #include #include #include #include #include std::wstring correctXMLString=L"Test for Virtual Buffer LibraryThis content has been rendered by the Test backend. For a much better example of how the Virtual buffer library can be used, please visit the NVDA websitewhere you can find the NVDA screen reader.Copyright (c)2008 NV Access"; #define testBackendPath "VBufBackend_example.dll" int main(int argc, char* argv[]) { #ifdef DEBUG std::wofstream *debugFile=new std::wofstream("debug.log"); debug_start(debugFile); #endif VBufStorage_buffer_t* buffer=new VBufStorage_buffer_t(); VBufBackend_t* backend=new ExampleVBufBackend_t(1,1,buffer); std::wstring s; buffer->lock.acquire(); buffer->getTextInRange(0,buffer->getTextLength(),s,true); buffer->lock.release(); delete backend; delete buffer; if(s!=correctXMLString) { std::wcerr<