2
0
Fork 0
mirror of https://github.com/bazel-contrib/rules_foreign_cc synced 2024-12-01 22:16:27 +00:00
rules_foreign_cc/examples/cmake_nghttp2/nghttp2-test.cpp

13 lines
362 B
C++
Raw Normal View History

2018-08-22 08:22:56 +00:00
#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;
}