Fix formatting on tests file

This commit is contained in:
Rapptz 2014-04-27 01:18:54 -04:00
parent 63bc2b06cb
commit b6c2f1c6d5

View File

@ -8,24 +8,17 @@ std::string free_function() {
}
struct object {
std::string operator() () {
std::cout << "member_test()" << std::endl;
return "test";
}
};
struct fuser {
int x;
fuser() : x(0) {}
fuser( ) : x( 0 ) {
}
fuser( int x ) : x( x ) {
}
fuser(int x) : x(x) {}
int add(int y) {
return x + y;
@ -39,12 +32,10 @@ struct fuser {
namespace crapola {
struct fuser {
int x;
fuser( ) : x( 0 ) {
}
fuser( int x ) : x( x ) {
}
fuser( int x, int x2 ) : x( x * x2 ) {
}
fuser() : x(0) {}
fuser(int x) : x(x) {}
fuser(int x, int x2) : x(x * x2) {}
int add(int y) {
return x + y;
}
@ -407,8 +398,7 @@ TEST_CASE("tables/userdata constructors", "Show that we can create classes from
"x = b:add2(1)\n"
"c = crapola_fuser.new(2, 3)\n"
"y = c:add(1)\n"
"z = c:add2(1)\n"
);
"z = c:add2(1)\n");
sol::object a = lua.get<sol::object>("a");
auto atype = a.get_type();
REQUIRE((atype == sol::type::userdata));