diff options
Diffstat (limited to 'debian/uncrustify-trinity/uncrustify-trinity-0.78.0/tests/expected/pawn/60003-tags.pawn')
-rw-r--r-- | debian/uncrustify-trinity/uncrustify-trinity-0.78.0/tests/expected/pawn/60003-tags.pawn | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.78.0/tests/expected/pawn/60003-tags.pawn b/debian/uncrustify-trinity/uncrustify-trinity-0.78.0/tests/expected/pawn/60003-tags.pawn new file mode 100644 index 00000000..b21f7679 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.78.0/tests/expected/pawn/60003-tags.pawn @@ -0,0 +1,69 @@ + +enum token +{ + t_type, + Rational:t_value, + t_word[20], +} + + +new bool:flag = true; /* "flag" can only hold "true" or "false" */ +const error:success = 0; +const error:fatal= 1; +const error:nonfatal = 2; +error:errno = fatal; + +native printf(const format[], { Float, _ }: ...); + +new Float:chance_to_avoid = (p_resists[id][RESISTIDX_FIRE] >= RESIST_MAX_VALUE) ? + 1.00 : (float( p_resists[id][RESISTIDX_FIRE] ) / float( RESIST_MAX_VALUE )); + +xplevel_lev[j] = XP_PER_LEVEL_BASE_LT + ( (j - 10) * XP_PER_LEVEL_LT) + + floatround( float( j / 20 ) * XP_PER_LEVEL_LT ); + + +main() +{ + new Float:xpos; + new Float:ypos; + + new apple:elstar; /* variable "elstar" with tag "apple" */ + new orange:valencia; /* variable "valencia" with tag "orange" */ + new x; /* untagged variable "x" */ + elstar = valencia; /* tag mismatch */ + elstar = x; /* tag mismatch */ + x = valencia; /* ok */ + + new Float:chance_to_avoid = (p_resists[id][RESISTIDX_FIRE] >= RESIST_MAX_VALUE) ? + 1.00 : (float( p_resists[id][RESISTIDX_FIRE] ) / float( RESIST_MAX_VALUE )); + + xplevel_lev[j] = XP_PER_LEVEL_BASE_LT + ( (j - 10) * XP_PER_LEVEL_LT) + + floatround( float( j / 20 ) * XP_PER_LEVEL_LT ); + + if (apple:valencia < elstar) { + valencia = orange:elstar; + } + +some_label: // target for a goto + #pragma rational Float + + new Float:limit = -5.0; + new Float:value = -1.0; + if (value < limit) { + printf("Value %f below limit %f\n", _:value, _:limit); + } else { + printf("Value above limit\n"); + } + goto some_label; +} + +foo() +{ + if (ape) { + dofunc(1); + } else if (monkey) { + dofunc(2); + } else { + dofunc(3); + } +}
\ No newline at end of file |