-
Notifications
You must be signed in to change notification settings - Fork 0
/
tests.cc
34 lines (22 loc) · 1.1 KB
/
tests.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <iostream>
#include "converter.h"
int main() {
using namespace converter::func_spec;
using namespace converter::stubs;
Function fun{"fun", Ret{"ptr"}, {{"longlong"}, {"ptr"}, {"long"}, {"uint"}}};
Function fun_void{"fun", Ret{"void"}, {}};
Function f{"f", Ret{"int"}, {{"int"}, {"int"}}};
auto pnum = Function::from_line_decl("pnum void int");
auto pstr = Function::from_line_decl("pstr void ptr");
// Function p{"f", Ret{"int"}, {{"int"}, {"int"}}};
// std::cout << converter::stubs::Stub::asmin(fun);
// std::cout << converter::stubs::Stub::asmin(fun_void);
// std::cout << converter::stubs::Stub::asmin(f);
// std::cout << Stub::asmout(pnum);
auto check = Function::from_line_decl("check void");
auto validate_neg = Function::from_line_decl("validate_neg void long long longlong longlong");
auto validate = Function::from_line_decl("validate void int long longlong uint ulong ulonglong");
auto validate_ptr = Function::from_line_decl("validate_ptr int ptr");
// std::cout << Stub::asmin(check);
std::cout << Stub::asmout(validate_neg);
}