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/third_party/cares/c-ares-test.cpp
UebelAndre e285764b78
Restructed examples and enabled more testing (#515)
* Reorganized examples

* Documentation

* Third party
2021-02-26 20:21:13 +00:00

14 lines
337 B
C++

#include "ares.h"
#include <iostream>
#include <string.h>
int main(int argc, char* argv[])
{
int version = 0;
const char* strVersion = ares_version(&version);
if (strcmp(strVersion, "1.14.0") != 0) {
throw std::runtime_error("Wrong version: " + std::string(strVersion));
}
std::cout << "C-ares version: " << strVersion;
}