Removed tests.

This commit is contained in:
tastytea 2019-02-22 08:31:03 +01:00
parent 8c97e8f516
commit 357b04dac2
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
3 changed files with 0 additions and 71 deletions

View File

@ -1,9 +0,0 @@
/* This file is part of mastodon-cpp.
*/
#include "mastodon-cpp.hpp"
int main(int argc, char *argv[])
{
Mastodon::API test("", "");
}

View File

@ -1,23 +0,0 @@
/* This file is part of mastodon-cpp.
*/
#include <iostream>
#include <cstdint>
#include "mastodon-cpp.hpp"
int main(int argc, char *argv[])
{
Mastodon::API test("soc.ialis.me", "");
std::string answer;
std::uint16_t ret = test.get(Mastodon::API::v1::instance, answer);
if (ret == 0)
{
if (answer.substr(7, 14) == "\"soc.ialis.me\"")
{
return 0;
}
}
std::cout << ret << ": " << answer.substr(7, 14) << '\n';
return 1;
}

View File

@ -1,39 +0,0 @@
/* This file is part of mastodon-cpp.
*/
// Don't compile this if the Easy-interface is turned off
#ifndef WITHOUT_EASY
#include <iostream>
#include <cstdint>
#include "mastodon-cpp.hpp"
#include "easy/easy.hpp"
#include "easy/entities/status.hpp"
int main(int argc, char *argv[])
{
Mastodon::Easy test("botsin.space", "");
std::string answer;
std::uint16_t ret = test.get(Mastodon::API::v1::timelines_public,
{ { "limit", { "1" } } }, answer);
if (ret == 0)
{
Mastodon::Easy::Status status(answer);
if (status.valid())
{
return 0;
}
}
std::cout << ret << ": " << answer << '\n';
return 1;
}
#else
#include <cstdio>
int main()
{
printf("mastodon-cpp was compiled without Easy support.\n");
return 0;
}
#endif // WITHOUT_EASY