tests: reorder.

* tests/calc.at (power): Move its definition, as a preparation for
forthcoming changes.
And space changes.
This commit is contained in:
Akim Demaille
2012-06-11 16:43:42 +02:00
parent 9d67a52ad6
commit 3d8082ad27

View File

@@ -289,6 +289,16 @@ exp:
; ;
%% %%
static int
power (int base, int exponent)
{
int res = 1;
assert (0 <= exponent);
for (/* Niente */; exponent; --exponent)
res *= base;
return res;
}
]AT_SKEL_CC_IF( ]AT_SKEL_CC_IF(
[AT_LOCATION_TYPE_IF([[ [AT_LOCATION_TYPE_IF([[
std::ostream& std::ostream&
@@ -344,17 +354,6 @@ AT_YYERROR_SEES_LOC_IF([
]AT_DEFINES_IF(, [AT_CALC_LEX])[ ]AT_DEFINES_IF(, [AT_CALC_LEX])[
static int
power (int base, int exponent)
{
int res = 1;
assert (0 <= exponent);
for (/* Niente */; exponent; --exponent)
res *= base;
return res;
}
/* A C main function. */ /* A C main function. */
int int
main (int argc, const char **argv) main (int argc, const char **argv)