From af91b5b5841aaa34ebf2d2062041c874425f474f Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Wed, 29 Dec 2021 10:36:15 -0500 Subject: Add QUtil::file_can_be_opened --- libtests/qutil.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libtests/qutil.cc') diff --git a/libtests/qutil.cc b/libtests/qutil.cc index f52ec2dc..46eb840c 100644 --- a/libtests/qutil.cc +++ b/libtests/qutil.cc @@ -203,6 +203,9 @@ void fopen_wrapper_test() std::cout << "exception: " << s.what() << std::endl; assert(s.getErrno() != 0); } + + assert(QUtil::file_can_be_opened("qutil.out")); + assert(! QUtil::file_can_be_opened("/does/not/exist")); } void getenv_test() -- cgit v1.2.3-54-g00ecf