aboutsummaryrefslogtreecommitdiffstats
path: root/libtests/closed_file_input_source.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2018-08-05 01:50:21 +0200
committerJay Berkenbilt <ejb@ql.org>2018-08-05 01:52:46 +0200
commit4f4c627b77a169e1729982fa03dd75d5035f0297 (patch)
tree50230823b7f82e2ffe059684dec1858f06b5be73 /libtests/closed_file_input_source.cc
parent7855e18ae2f535f7e1b6fa396e298511e66e6f94 (diff)
downloadqpdf-4f4c627b77a169e1729982fa03dd75d5035f0297.tar.zst
ClosedFileInputSource: add method to keep file open
During periods of intensive operation on a specific file, this method can reduce the overhead of repeated open/close operations.
Diffstat (limited to 'libtests/closed_file_input_source.cc')
-rw-r--r--libtests/closed_file_input_source.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/libtests/closed_file_input_source.cc b/libtests/closed_file_input_source.cc
index 9cf5ff04..7309ca31 100644
--- a/libtests/closed_file_input_source.cc
+++ b/libtests/closed_file_input_source.cc
@@ -65,6 +65,11 @@ int main()
std::cout << "testing with ClosedFileInputSource\n";
ClosedFileInputSource cf("input");
do_tests(&cf);
+ std::cout << "testing with ClosedFileInputSource in stay open mode\n";
+ ClosedFileInputSource cf2("input");
+ cf2.stayOpen(true);
+ do_tests(&cf2);
+ cf2.stayOpen(false);
std::cout << "testing with FileInputSource\n";
FileInputSource f;
f.setFilename("input");