2
0
Fork 0
mirror of https://github.com/bazel-contrib/rules_foreign_cc synced 2024-11-30 16:42:07 +00:00
rules_foreign_cc/examples/cmake_nghttp2/nghttp2-test.cpp
2018-08-22 10:22:56 +02:00

13 lines
362 B
C++

#include "nghttp2/nghttp2.h"
#include <iostream>
#include <string.h>
int main(int argc, char* argv[])
{
nghttp2_info* version = nghttp2_version(0);
if (strcmp(version -> version_str, "1.32.90") != 0) {
throw std::runtime_error("Wrong version: " + std::string(version -> version_str));
}
std::cout << "nghttp2 version: " << version -> version_str;
}