use github repo as central

This commit is contained in:
Jackson Tian
2019-01-09 14:07:33 +08:00
parent 9664fb1b00
commit bc0df2dcec
46 changed files with 1864 additions and 29 deletions

22
test/core/runnable_ut.cc Normal file
View File

@@ -0,0 +1,22 @@
#include <iostream>
#include <stdio.h>
#include "gtest/gtest.h"
#include "alibabacloud/core/Runnable.h"
using namespace std;
using namespace AlibabaCloud;
static int nbr = 0;
void foo() {
nbr = 1;
}
// there should be no exception
TEST(Runnable, basic) {
std::function<void()> func(foo);
Runnable f(func);
EXPECT_TRUE(nbr == 0);
f.run();
EXPECT_TRUE(nbr == 1);
}