aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test/unit_tests/error.cpp
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-03-24 19:22:40 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-03-27 11:25:22 +0300
commit10b3c9e5a8ce46cfbc3c80042fcaf6079f6a8a34 (patch)
tree13cb9beac308afab5ec1188bb73f28beb64eafe2 /test/unit_tests/error.cpp
parentfix a bug where I failed to account for TCHARs, again (diff)
downloadwinapi-debug-10b3c9e5a8ce46cfbc3c80042fcaf6079f6a8a34.tar.gz
winapi-debug-10b3c9e5a8ce46cfbc3c80042fcaf6079f6a8a34.zip
add some unit tests
Diffstat (limited to 'test/unit_tests/error.cpp')
-rw-r--r--test/unit_tests/error.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/unit_tests/error.cpp b/test/unit_tests/error.cpp
new file mode 100644
index 0000000..10eb8b4
--- /dev/null
+++ b/test/unit_tests/error.cpp
@@ -0,0 +1,16 @@
+#include <pdb/all.hpp>
+
+#include <boost/test/unit_test.hpp>
+
+#include <windows.h>
+
+#include <string>
+
+BOOST_AUTO_TEST_SUITE(error_tests)
+
+BOOST_AUTO_TEST_CASE(file_not_found) {
+ const std::string actual{pdb::error::windows(ERROR_FILE_NOT_FOUND).what()};
+ BOOST_TEST(actual == "The system cannot find the file specified.");
+}
+
+BOOST_AUTO_TEST_SUITE_END()