[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] Re: Testsuite status (SoC)
From: |
Alex Queiroz |
Subject: |
Re: [Monotone-devel] Re: Testsuite status (SoC) |
Date: |
Thu, 13 Jul 2006 17:05:34 -0300 |
Hallo,
On 7/13/06, Bruce Stephens <address@hidden> wrote:
Easier, but still not trivial. It's surely still four or five lines
per function?
This is getting off-topic, but still... What I did was to create
some macros for the developers to allow them to write the testsuite
without any Lua knowledge:
DECLARE_TEST(equality)
{
if(1 == 1) {
TEST_OK();
} else {
TEST_FAILED("not equal!");
}
}
would become:
static int equality(lua_State* L)
{
if(1 == 1) {
do {
lua_pushboolean(L, 1);
return 1;
} while(0);
} else {
do {
return luaL_error(L, "%s(%d): %s", __FILE__, __LINE__, "not
equal!");
} while(0);
}
}
Of course there is more to it, but as you can see the impact is minimal.
--
-alex
http://www.ventonegro.org/
- [Monotone-devel] Testsuite status (SoC), Timothy Brownawell, 2006/07/06
- [Monotone-devel] Re: Testsuite status (SoC), Timothy Brownawell, 2006/07/12
- Re: [Monotone-devel] Re: Testsuite status (SoC), Zack Weinberg, 2006/07/12
- Re: [Monotone-devel] Re: Testsuite status (SoC), Nathaniel Smith, 2006/07/13
- Re: [Monotone-devel] Re: Testsuite status (SoC), Zack Weinberg, 2006/07/13
- Re: [Monotone-devel] Re: Testsuite status (SoC), Nathaniel Smith, 2006/07/13
- Re: [Monotone-devel] Re: Testsuite status (SoC), Alex Queiroz, 2006/07/13
- [Monotone-devel] Re: Testsuite status (SoC), Bruce Stephens, 2006/07/13
- Re: [Monotone-devel] Re: Testsuite status (SoC), Alex Queiroz, 2006/07/13
- [Monotone-devel] Re: Testsuite status (SoC), Bruce Stephens, 2006/07/13
- Re: [Monotone-devel] Re: Testsuite status (SoC),
Alex Queiroz <=
- Re: [Monotone-devel] Re: Testsuite status (SoC), Timothy Brownawell, 2006/07/13
- Re: [Monotone-devel] Re: Testsuite status (SoC), Timothy Brownawell, 2006/07/19
- Re: [Monotone-devel] Re: Testsuite status (SoC), Timothy Brownawell, 2006/07/25