encfs/vendor/github.com/muflihun/easyloggingpp/samples/STL/smart-pointer-null-check.cpp
Valient Gough 5f0806c5cc Add "easylogging" from "https://github.com/muflihun/easyloggingpp@master"
git-vendor-name: easylogging
git-vendor-dir: vendor/github.com/muflihun/easyloggingpp
git-vendor-repository: https://github.com/muflihun/easyloggingpp
git-vendor-ref: master
2017-08-05 23:23:41 -07:00

23 lines
454 B
C++

//
// This file is part of Easylogging++ samples
// Smart pointer null check
//
// Revision 1.0
// @author mkhan3189
//
#include "easylogging++.h"
#include <memory>
INITIALIZE_EASYLOGGINGPP
int main(void) {
std::unique_ptr<std::string> test2(new std::string);
CHECK_NOTNULL(test2) << "And I didn't expect this to be null anyway";
std::unique_ptr<int> test3;
CHECK_NOTNULL(test3) << "It should crash here";
return 0;
}