diff options
Diffstat (limited to 'debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp')
966 files changed, 27960 insertions, 0 deletions
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/02102-indent-c.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/02102-indent-c.cpp new file mode 100644 index 00000000..978dfae4 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/02102-indent-c.cpp @@ -0,0 +1,1024 @@ +/** + * @file indent.cpp + * Does all the indenting stuff. + * + * $Id: indent.cpp 548 2006-10-21 02:31:55Z bengardner $ + */ +#include "uncrustify_types.h" +#include "chunk.h" +#include "prototypes.h" +#include <cstdio> +#include <cstdlib> +#include <cstring> +#include <cerrno> +#include <cctype> + + +/** + * General indenting approach: + * Indenting levels are put into a stack. + * + * The stack entries contain: + * - opening type + * - brace column + * - continuation column + * + * Items that start a new stack item: + * - preprocessor (new parse frame) + * - Brace Open (Virtual brace also) + * - Paren, Square, Angle open + * - Assignments + * - C++ '<<' operator (ie, cout << "blah") + * - case + * - class colon + * - return + * - types + * - any other continued statement + * + * Note that the column of items marked 'PCF_WAS_ALIGNED' is not changed. + * + * For an open brace: + * - indent increases by indent_columns + * - if part of if/else/do/while/switch/etc, an extra indent may be applied + * - if in a paren, then cont-col is set to column + 1, ie "({ some code })" + * + * Open paren/square/angle: + * cont-col is set to the column of the item after the open paren, unless + * followed by a newline, then it is set to (brace-col + indent_columns). + * Examples: + * a_really_long_funcion_name( + * param1, param2); + * a_really_long_funcion_name(param1, + * param2); + * + * Assignments: + * Assignments are continued aligned with the first item after the assignment, + * unless the assign is followed by a newline. + * Examples: + * some.variable = asdf + asdf + + * asdf; + * some.variable = + * asdf + asdf + asdf; + * + * C++ << operator: + * Handled the same as assignment. + * Examples: + * cout << "this is test number: " + * << test_number; + * + * case: + * Started with case or default. + * Terminated with close brace at level or another case or default. + * Special indenting according to various rules. + * - indent of case label + * - indent of case body + * - how to handle optional braces + * Examples: + * { + * case x: { + * a++; + * break; + * } + * case y: + * b--; + * break; + * default: + * c++; + * break; + * } + * + * Class colon: + * Indent continuation by indent_columns: + * class my_class : + * baseclass1, + * baseclass2 + * { + * + * Return: same as assignemts + * If the return statement is not fully paren'd, then the indent continues at + * the column of the item after the return. If it is paren'd, then the paren + * rules apply. + * return somevalue + + * othervalue; + * + * Type: pretty much the same as assignments + * Examples: + * int foo, + * bar, + * baz; + * + * Any other continued item: + * There shouldn't be anything not covered by the above cases, but any other + * continued item is indented by indent_columns: + * Example: + * somereallycrazylongname.with[lotsoflongstuff]. + * thatreallyannoysme.whenIhavetomaintain[thecode] = 3; + */ + +static void indent_comment(Chunk *pc, int col); + + +void indent_to_column(Chunk *pc, int column) + { + if (column < pc->GetColumn()) + column = pc->GetColumn(); + + reindent_line(pc, column); + } + +/** + * Changes the initial indent for a line to the given column + * + * @param pc The chunk at the start of the line + * @param column The desired column + */ +void reindent_line(Chunk *pc, int column) + { + int col_delta; + int min_col; + + LOG_FMT(LINDLINE, "%s: %d] col %d on %.*s [%s] => %d\n", + __func__, pc->GetOrigLine(), pc->GetColumn(), pc->len, pc->GetStr(), + get_token_name(pc->GetType()), column); + + if (column == pc->GetColumn()) + return; + + col_delta = column - pc->GetColumn(); + pc->SetColumn(column); + min_col = pc->GetColumn(); + + do + { + min_col += pc->len; + pc = pc->GetNext(); + + if (pc != NULL) + { + if (pc->IsComment()) + { + pc->SetColumn(pc->GetOrigCol()); + + if (pc->GetColumn() < min_col) + pc->SetColumn(min_col + 1); + + LOG_FMT(LINDLINE, "%s: set comment on line %d to col %d (orig %d)\n", + __func__, pc->GetOrigLine(), pc->GetColumn(), pc->GetOrigCol()); + } + else + { + pc->SetColumn(pc->GetColumn() + col_delta); + + if (pc->GetColumn() < min_col) + pc->SetColumn(min_col); + } + } + } + while ((pc != NULL) && (pc->GetNlCount() == 0)); + } + +/** + * Starts a new entry + * + * @param frm The parse frame + * @param pc The chunk causing the push + */ +static void indent_pse_push(struct parse_frame& frm, Chunk *pc) + { + static int ref = 0; + + /* check the stack depth */ + if (frm.pse_tos < (int)ARRAY_SIZE(frm.pse)) + { + /* Bump up the index and initialize it */ + frm.pse_tos++; + memset(&frm.pse[frm.pse_tos], 0, sizeof(frm.pse[frm.pse_tos])); + + LOG_FMT(LINDPSE, "%4d] OPEN [%d,%s] level=%d\n", + pc->GetOrigLine(), frm.pse_tos, get_token_name(pc->GetType()), pc->GetLevel()); + + frm.pse[frm.pse_tos].type = pc->GetType(); + frm.pse[frm.pse_tos].level = pc->GetLevel(); + frm.pse[frm.pse_tos].open_line = pc->GetOrigLine(); + frm.pse[frm.pse_tos].ref = ++ref; + frm.pse[frm.pse_tos].in_preproc = (pc->GetFlags() & PCF_IN_PREPROC) != 0; + } + } + +/** + * Removes the top entry + * + * @param frm The parse frame + * @param pc The chunk causing the push + */ +static void indent_pse_pop(struct parse_frame& frm, Chunk *pc) + { + /* Bump up the index and initialize it */ + if (frm.pse_tos > 0) + { + if (pc != NULL) + { + LOG_FMT(LINDPSE, "%4d] CLOSE [%d,%s] on %s, started on line %d, level=%d/%d\n", + pc->GetOrigLine(), frm.pse_tos, + get_token_name(frm.pse[frm.pse_tos].type), + get_token_name(pc->GetType()), + frm.pse[frm.pse_tos].open_line, + frm.pse[frm.pse_tos].level, + pc->GetLevel()); + } + else + { + LOG_FMT(LINDPSE, " EOF] CLOSE [%d,%s], started on line %d\n", + frm.pse_tos, get_token_name(frm.pse[frm.pse_tos].type), + frm.pse[frm.pse_tos].open_line); + } + + frm.pse_tos--; + } + } + +static int token_indent(E_Token type) + { + switch (type) + { + case CT_IF: + case CT_DO: + return 3; + + case CT_FOR: + case CT_ELSE: // wacky, but that's what is wanted + return 4; + + case CT_WHILE: + return 6; + + case CT_SWITCH: + return 7; + + case CT_ELSEIF: + return 8; + + default: + return 0; //cpd.settings[UO_indent_braces].n; + } + } + +/** + * Change the top-level indentation only by changing the column member in + * the chunk structures. + * The level indicator must already be set. + */ +void indent_text(void) + { + Chunk *pc; + Chunk *next; + Chunk *prev = NULL; + bool did_newline = true; + int idx; + int vardefcol = 0; + int indent_size = cpd.settings[UO_indent_columns].n; + int tmp; + struct parse_frame frm; + bool in_preproc = false, was_preproc = false; + int indent_column; + int cout_col = 0; // for aligning << stuff + int cout_level = 0; // for aligning << stuff + int parent_token_indent = 0; + + memset(&frm, 0, sizeof(frm)); + + /* dummy top-level entry */ + frm.pse[0].indent = 1; + frm.pse[0].indent_tmp = 1; + frm.pse[0].type = CT_EOF; + + pc = Chunk::GetHead(); + + while (pc != NULL) + { + /* Handle proprocessor transitions */ + was_preproc = in_preproc; + in_preproc = (pc->GetFlags() & PCF_IN_PREPROC) != 0; + + if (cpd.settings[UO_indent_brace_parent].b) + parent_token_indent = token_indent(pc->GetParentType()); + + /* Clean up after a #define */ + if (!in_preproc) + while ((frm.pse_tos > 0) && frm.pse[frm.pse_tos].in_preproc) + indent_pse_pop(frm, pc); + + else + { + pf_check(&frm, pc); + + if (!was_preproc) + { + /* Transition into a preproc by creating a dummy indent */ + frm.level++; + indent_pse_push(frm, pc); + + frm.pse[frm.pse_tos].indent = 1 + indent_size; + frm.pse[frm.pse_tos].indent_tmp = frm.pse[frm.pse_tos].indent; + } + } + + if ((cout_col > 0) && + (pc->IsSemicolon() || + (pc->GetLevel() < cout_level))) + { + cout_col = 0; + cout_level = 0; + } + + /** + * Handle non-brace closures + */ + + int old_pse_tos; + + do + { + old_pse_tos = frm.pse_tos; + + /* End anything that drops a level + * REVISIT: not sure about the preproc check + */ + if (!pc->IsNewline() && + !pc->IsComment() && + ((pc->GetFlags() & PCF_IN_PREPROC) == 0) && + (frm.pse[frm.pse_tos].level > pc->GetLevel())) + indent_pse_pop(frm, pc); + + if (frm.pse[frm.pse_tos].level == pc->GetLevel()) + { + /* process virtual braces closes (no text output) */ + if ((pc->GetType() == CT_VBRACE_CLOSE) && + (frm.pse[frm.pse_tos].type == CT_VBRACE_OPEN)) + { + indent_pse_pop(frm, pc); + frm.level--; + pc = pc->GetNext(); + } + + /* End any assign operations with a semicolon on the same level */ + if ((frm.pse[frm.pse_tos].type == CT_ASSIGN) && + (pc->IsSemicolon() || + (pc->GetType() == CT_COMMA) || + (pc->GetType() == CT_BRACE_OPEN))) + indent_pse_pop(frm, pc); + + /* End any CPP class colon crap */ + if ((frm.pse[frm.pse_tos].type == CT_CLASS_COLON) && + ((pc->GetType() == CT_BRACE_OPEN) || + pc->IsSemicolon())) + indent_pse_pop(frm, pc); + + /* a case is ended with another case or a close brace */ + if ((frm.pse[frm.pse_tos].type == CT_CASE) && + ((pc->GetType() == CT_BRACE_CLOSE) || + (pc->GetType() == CT_CASE))) + indent_pse_pop(frm, pc); + + /* a return is ended with a semicolon */ + if ((frm.pse[frm.pse_tos].type == CT_RETURN) && + pc->IsSemicolon()) + indent_pse_pop(frm, pc); + + /* Close out parens and squares */ + if ((frm.pse[frm.pse_tos].type == (pc->GetType() - 1)) && + ((pc->GetType() == CT_PAREN_CLOSE) || + (pc->GetType() == CT_SPAREN_CLOSE) || + (pc->GetType() == CT_FPAREN_CLOSE) || + (pc->GetType() == CT_SQUARE_CLOSE) || + (pc->GetType() == CT_ANGLE_CLOSE))) + { + indent_pse_pop(frm, pc); + frm.paren_count--; + } + } + } + while (old_pse_tos > frm.pse_tos); + + /* Grab a copy of the current indent */ + indent_column = frm.pse[frm.pse_tos].indent_tmp; + + if (!pc->IsNewline() && !pc->IsComment()) + { + LOG_FMT(LINDPC, " -=[ %.*s ]=- top=%d %s %d/%d\n", + pc->len, pc->GetStr(), + frm.pse_tos, + get_token_name(frm.pse[frm.pse_tos].type), + frm.pse[frm.pse_tos].indent_tmp, + frm.pse[frm.pse_tos].indent); + } + + /** + * Handle stuff that can affect the current indent: + * - brace close + * - vbrace open + * - brace open + * - case (immediate) + * - labels (immediate) + * - class colons (immediate) + * + * And some stuff that can't + * - open paren + * - open square + * - assignment + * - return + */ + + if (pc->GetType() == CT_BRACE_CLOSE) + { + if (frm.pse[frm.pse_tos].type == CT_BRACE_OPEN) + { + indent_pse_pop(frm, pc); + frm.level--; + + /* Update the indent_column if needed */ + if (!cpd.settings[UO_indent_braces].b && + (parent_token_indent == 0)) + indent_column = frm.pse[frm.pse_tos].indent_tmp; + + if ((pc->GetParentType() == CT_IF) || + (pc->GetParentType() == CT_ELSE) || + (pc->GetParentType() == CT_ELSEIF) || + (pc->GetParentType() == CT_DO) || + (pc->GetParentType() == CT_WHILE) || + (pc->GetParentType() == CT_SWITCH) || + (pc->GetParentType() == CT_FOR)) + indent_column += cpd.settings[UO_indent_brace].n; + } + } + else if (pc->GetType() == CT_VBRACE_OPEN) + { + frm.level++; + indent_pse_push(frm, pc); + + frm.pse[frm.pse_tos].indent = frm.pse[frm.pse_tos - 1].indent + indent_size; + frm.pse[frm.pse_tos].indent_tmp = frm.pse[frm.pse_tos].indent; + + /* Always indent on virtual braces */ + indent_column = frm.pse[frm.pse_tos].indent_tmp; + } + else if (pc->GetType() == CT_BRACE_OPEN) + { + frm.level++; + indent_pse_push(frm, pc); + + if (frm.paren_count != 0) + /* We are inside ({ ... }) -- indent one tab from the paren */ + frm.pse[frm.pse_tos].indent = frm.pse[frm.pse_tos - 1].indent_tmp + indent_size; + else + { + /* Use the prev indent level + indent_size. */ + frm.pse[frm.pse_tos].indent = frm.pse[frm.pse_tos - 1].indent + indent_size; + + /* If this brace is part of a statement, bump it out by indent_brace */ + if ((pc->GetParentType() == CT_IF) || + (pc->GetParentType() == CT_ELSE) || + (pc->GetParentType() == CT_ELSEIF) || + (pc->GetParentType() == CT_DO) || + (pc->GetParentType() == CT_WHILE) || + (pc->GetParentType() == CT_SWITCH) || + (pc->GetParentType() == CT_FOR)) + { + if (parent_token_indent != 0) + frm.pse[frm.pse_tos].indent += parent_token_indent - indent_size; + else + { + frm.pse[frm.pse_tos].indent += cpd.settings[UO_indent_brace].n; + indent_column += cpd.settings[UO_indent_brace].n; + } + } + else if (pc->GetParentType() == CT_CASE) + { + /* The indent_case_brace setting affects the parent CT_CASE */ + frm.pse[frm.pse_tos].indent_tmp += cpd.settings[UO_indent_case_brace].n; + frm.pse[frm.pse_tos].indent += cpd.settings[UO_indent_case_brace].n; + } + else if ((pc->GetParentType() == CT_CLASS) && !cpd.settings[UO_indent_class].b) + frm.pse[frm.pse_tos].indent -= indent_size; + else if ((pc->GetParentType() == CT_NAMESPACE) && !cpd.settings[UO_indent_namespace].b) + frm.pse[frm.pse_tos].indent -= indent_size; + } + + if ((pc->GetFlags() & PCF_DONT_INDENT) != 0) + { + frm.pse[frm.pse_tos].indent = pc->GetColumn(); + indent_column = pc->GetColumn(); + } + else + { + /** + * If there isn't a newline between the open brace and the next + * item, just indent to wherever the next token is. + * This covers this sort of stuff: + * { a++; + * b--; }; + */ + next = pc->GetNextNcNnl(); + + if (!pc->IsNewlineBetween(next)) + frm.pse[frm.pse_tos].indent = next->GetColumn(); + + frm.pse[frm.pse_tos].indent_tmp = frm.pse[frm.pse_tos].indent; + frm.pse[frm.pse_tos].open_line = pc->GetOrigLine(); + + /* Update the indent_column if needed */ + if (cpd.settings[UO_indent_braces].n || + (parent_token_indent != 0)) + indent_column = frm.pse[frm.pse_tos].indent_tmp; + } + } + else if (pc->GetType() == CT_CASE) + { + /* Start a case - indent UO_indent_switch_case from the switch level */ + tmp = frm.pse[frm.pse_tos].indent + cpd.settings[UO_indent_switch_case].n; + + indent_pse_push(frm, pc); + + frm.pse[frm.pse_tos].indent = tmp; + frm.pse[frm.pse_tos].indent_tmp = tmp - indent_size; + + /* Always set on case statements */ + indent_column = frm.pse[frm.pse_tos].indent_tmp; + } + else if (pc->GetType() == CT_LABEL) + { + /* Labels get sent to the left or backed up */ + if (cpd.settings[UO_indent_label].n > 0) + indent_column = cpd.settings[UO_indent_label].n; + else + indent_column = frm.pse[frm.pse_tos].indent + + cpd.settings[UO_indent_label].n; + } + else if (pc->GetType() == CT_CLASS_COLON) + { + /* just indent one level */ + indent_pse_push(frm, pc); + frm.pse[frm.pse_tos].indent = frm.pse[frm.pse_tos - 1].indent_tmp + indent_size; + frm.pse[frm.pse_tos].indent_tmp = frm.pse[frm.pse_tos].indent; + + indent_column = frm.pse[frm.pse_tos].indent_tmp; + + if (cpd.settings[UO_indent_class_colon].b) + { + prev = pc->GetPrev(); + + if (prev->IsNewline()) + { + frm.pse[frm.pse_tos].indent += 2; + /* don't change indent of current line */ + } + } + } + else if ((pc->GetType() == CT_PAREN_OPEN) || + (pc->GetType() == CT_SPAREN_OPEN) || + (pc->GetType() == CT_FPAREN_OPEN) || + (pc->GetType() == CT_SQUARE_OPEN) || + (pc->GetType() == CT_ANGLE_OPEN)) + { + /* Open parens and squares - never update indent_column */ + indent_pse_push(frm, pc); + frm.pse[frm.pse_tos].indent = pc->GetColumn() + pc->len; + + if (cpd.settings[UO_indent_func_call_param].b && + (pc->GetType() == CT_FPAREN_OPEN) && + (pc->GetParentType() == CT_FUNC_CALL)) + frm.pse[frm.pse_tos].indent = frm.pse[frm.pse_tos - 1].indent + indent_size; + + if ((chunk_is_str(pc, "(", 1) && !cpd.settings[UO_indent_paren_nl].b) || + (chunk_is_str(pc, "[", 1) && !cpd.settings[UO_indent_square_nl].b)) + { + next = pc->GetNextNc(); + + if (next->IsNewline()) + { + int sub = 1; + + if (frm.pse[frm.pse_tos - 1].type == CT_ASSIGN) + sub = 2; + + frm.pse[frm.pse_tos].indent = frm.pse[frm.pse_tos - sub].indent + indent_size; + } + } + + frm.pse[frm.pse_tos].indent_tmp = frm.pse[frm.pse_tos].indent; + frm.paren_count++; + } + else if (pc->GetType() == CT_ASSIGN) + { + /** + * if there is a newline after the '=', just indent one level, + * otherwise align on the '='. + * Never update indent_column. + */ + next = pc->GetNext(); + + if (next != NULL) + { + indent_pse_push(frm, pc); + + if (next->IsNewline()) + frm.pse[frm.pse_tos].indent = frm.pse[frm.pse_tos - 1].indent_tmp + indent_size; + else + frm.pse[frm.pse_tos].indent = pc->GetColumn() + pc->len + 1; + + frm.pse[frm.pse_tos].indent_tmp = frm.pse[frm.pse_tos].indent; + } + } + else if (pc->GetType() == CT_RETURN) + { + /* don't count returns inside a () or [] */ + if (pc->GetLevel() == pc->GetBraceLevel()) + { + indent_pse_push(frm, pc); + frm.pse[frm.pse_tos].indent = frm.pse[frm.pse_tos - 1].indent + pc->len + 1; + frm.pse[frm.pse_tos].indent_tmp = frm.pse[frm.pse_tos - 1].indent; + } + } + else if (chunk_is_str(pc, "<<", 2)) + { + if (cout_col == 0) + { + cout_col = pc->GetColumn(); + cout_level = pc->GetLevel(); + } + } + else + { + /* anything else? */ + } + + /** + * Indent the line if needed + */ + if (did_newline && !pc->IsNewline() && (pc->len != 0)) + { + /** + * Check for special continuations. + * Note that some of these could be done as a stack item like + * everything else + */ + + prev = pc->GetPrevNcNnl(); + + if ((pc->GetType() == CT_MEMBER) || + (pc->GetType() == CT_DC_MEMBER) || + ((prev != NULL) && + ((prev->GetType() == CT_MEMBER) || + (prev->GetType() == CT_DC_MEMBER)))) + { + tmp = cpd.settings[UO_indent_member].n + indent_column; + LOG_FMT(LINDENT, "%s: %d] member => %d\n", + __func__, pc->GetOrigLine(), tmp); + reindent_line(pc, tmp); + } + else if (chunk_is_str(pc, "<<", 2) && (cout_col > 0)) + { + LOG_FMT(LINDENT, "%s: %d] cout_col => %d\n", + __func__, pc->GetOrigLine(), cout_col); + reindent_line(pc, cout_col); + } + else if ((vardefcol > 0) && + (pc->GetType() == CT_WORD) && + ((pc->GetFlags() & PCF_VAR_DEF) != 0) && + (prev != NULL) && (prev->GetType() == CT_COMMA)) + { + LOG_FMT(LINDENT, "%s: %d] Vardefcol => %d\n", + __func__, pc->GetOrigLine(), vardefcol); + reindent_line(pc, vardefcol); + } + else if ((pc->GetType() == CT_STRING) && (prev->GetType() == CT_STRING) && + cpd.settings[UO_indent_align_string].b) + { + LOG_FMT(LINDENT, "%s: %d] String => %d\n", + __func__, pc->GetOrigLine(), prev->GetColumn()); + reindent_line(pc, prev->GetColumn()); + } + else if (pc->IsComment()) + { + LOG_FMT(LINDENT, "%s: %d] comment => %d\n", + __func__, pc->GetOrigLine(), frm.pse[frm.pse_tos].indent_tmp); + indent_comment(pc, frm.pse[frm.pse_tos].indent_tmp); + } + else if (pc->GetType() == CT_PREPROC) + { + /* Preprocs are always in column 1. See indent_preproc() */ + if (pc->GetColumn() != 1) + reindent_line(pc, 1); + } + else + { + if (pc->GetColumn() != indent_column) + { + LOG_FMT(LINDENT, "%s: %d] indent => %d [%.*s]\n", + __func__, pc->GetOrigLine(), indent_column, pc->len, pc->GetStr()); + reindent_line(pc, indent_column); + } + } + + did_newline = false; + } + + /** + * Handle variable definition continuation indenting + */ + if ((pc->GetType() == CT_WORD) && + ((pc->GetFlags() & PCF_IN_FCN_DEF) == 0) && + ((pc->GetFlags() & PCF_VAR_1ST_DEF) == PCF_VAR_1ST_DEF)) + vardefcol = pc->GetColumn(); + + if (pc->IsSemicolon() || + ((pc->GetType() == CT_BRACE_OPEN) && (pc->GetParentType() == CT_FUNCTION))) + vardefcol = 0; + + /* if we hit a newline, reset indent_tmp */ + if (pc->IsNewline() || + (pc->GetType() == CT_COMMENT_MULTI) || + (pc->GetType() == CT_COMMENT_CPP)) + { + frm.pse[frm.pse_tos].indent_tmp = frm.pse[frm.pse_tos].indent; + + /** + * Handle the case of a multi-line #define w/o anything on the + * first line (indent_tmp will be 1 or 0) + */ + if ((pc->GetType() == CT_NL_CONT) && + (frm.pse[frm.pse_tos].indent_tmp <= indent_size)) + frm.pse[frm.pse_tos].indent_tmp = indent_size + 1; + + /* Get ready to indent the next item */ + did_newline = true; + } + + if (!pc->IsComment() && !pc->IsNewline()) + prev = pc; + + pc = pc->GetNext(); + } + + /* Throw out any stuff inside a preprocessor - no need to warn */ + while ((frm.pse_tos > 0) && frm.pse[frm.pse_tos].in_preproc) + indent_pse_pop(frm, pc); + + for (idx = 1; idx <= frm.pse_tos; idx++) + { + LOG_FMT(LWARN, "%s:%d Unmatched %s\n", + cpd.filename, frm.pse[idx].open_line, + get_token_name(frm.pse[idx].type)); + cpd.error_count++; + } + } + +/** + * returns true if forward scan reveals only single newlines or comments + * stops when hits code + * false if next thing hit is a closing brace, also if 2 newlines in a row + */ + + +static bool single_line_comment_indent_rule_applies(Chunk *start) + { + Chunk *pc = start; + int nl_count = 0; + + if (!pc->IsSingleLineComment()) + return false; + + /* scan forward, if only single newlines and comments before next line of code, we want to apply */ + while ((pc = pc->GetNext()) != NULL) + { + if (pc->IsNewline()) + { + if (nl_count > 0 || pc->GetNlCount() > 1) + return false; + + nl_count++; + } + else + { + nl_count = 0; + + if (!pc->IsSingleLineComment()) + { + /* here we check for things to run into that we wouldn't want to indent the comment for */ + /* for example, non-single line comment, closing brace */ + if (pc->IsComment() || pc->IsBraceClose()) + return false; + + return true; + } + } + } + + return false; + } + +/** + * REVISIT: This needs to be re-checked, maybe cleaned up + * + * Indents comments in a (hopefully) smart manner. + * + * There are two type of comments that get indented: + * - stand alone (ie, no tokens on the line before the comment) + * - trailing comments (last token on the line apart from a linefeed) + * + note that a stand-alone comment is a special case of a trailing + * + * The stand alone comments will get indented in one of three ways: + * - column 1: + * + There is an empty line before the comment AND the indent level is 0 + * + The comment was originally in column 1 + * + * - Same column as trailing comment on previous line (ie, aligned) + * + if originally within TBD (3) columns of the previous comment + * + * - syntax indent level + * + doesn't fit in the previous categories + * + * Options modify this behavior: + * - keep original column (don't move the comment, if possible) + * - keep relative column (move out the same amount as first item on line) + * - fix trailing comment in column TBD + * + * @param pc The comment, which is the first item on a line + * @param col The column if this is to be put at indent level + */ +static void indent_comment(Chunk *pc, int col) + { + Chunk *nl; + Chunk *prev; + + LOG_FMT(LCMTIND, "%s: line %d, col %d, level %d: ", __func__, + pc->GetOrigLine(), pc->GetOrigCol(), pc->GetLevel()); + + /* force column 1 comment to column 1 if not changing them */ + if ((pc->GetOrigCol() == 1) && !cpd.settings[UO_indent_col1_comment].b) + { + LOG_FMT(LCMTIND, "rule 1 - keep in col 1\n"); + pc->SetColumn(1); + return; + } + + nl = pc->GetPrev(); + + /* outside of any expression or statement? */ + if (pc->GetLevel() == 0) + { + if ((nl != NULL) && (nl->GetNlCount() > 1)) + { + LOG_FMT(LCMTIND, "rule 2 - level 0, nl before\n"); + pc->SetColumn(1); + return; + } + } + + prev = nl->GetPrev(); + + if (prev->IsComment() && (nl->GetNlCount() == 1)) + { + int coldiff = prev->GetOrigCol() - pc->GetOrigCol(); + + if ((coldiff <= 3) && (coldiff >= -3)) + { + pc->SetColumn(prev->GetColumn()); + LOG_FMT(LCMTIND, "rule 3 - prev comment, coldiff = %d, now in %d\n", + coldiff, pc->GetColumn()); + return; + } + } + + /* check if special single line comment rule applies */ + if (cpd.settings[UO_indent_sing_line_comments].n > 0 && single_line_comment_indent_rule_applies(pc)) + { + pc->SetColumn(col + cpd.settings[UO_indent_sing_line_comments].n); + LOG_FMT(LCMTIND, "rule 4 - single line comment indent, now in %d\n", pc->GetColumn()); + return; + } + + LOG_FMT(LCMTIND, "rule 5 - fall-through, stay in %d\n", col); + + pc->SetColumn(col); + } + +/** + * Put spaces on either side of the preproc (#) symbol. + * This is done by pointing pc->GetStr() into pp_str and adjusting the + * length. + */ +void indent_preproc(void) + { + Chunk *pc; + Chunk *next; + int pp_level; + int pp_level_sub = 0; + int tmp; + + /* Define a string of 16 spaces + # + 16 spaces */ + static const char *pp_str = " # "; + static const char *alt_str = " %: "; + + /* Scan to see if the whole file is covered by one #ifdef */ + int stage = 0; + + for (pc = Chunk::GetHead(); pc != NULL; pc = pc->GetNext()) + { + if (pc->IsComment() || pc->IsNewline()) + continue; + + if (stage == 0) + { + /* Check the first PP, make sure it is an #if type */ + if (pc->GetType() != CT_PREPROC) + break; + + next = pc->GetNext(); + + if ((next == NULL) || (next->GetType() != CT_PP_IF)) + break; + + stage = 1; + } + else if (stage == 1) + { + /* Scan until a PP at level 0 is found - the close to the #if */ + if ((pc->GetType() == CT_PREPROC) && + (pc->GetPpLevel() == 0)) + stage = 2; + + continue; + } + else if (stage == 2) + { + /* We should only see the rest of the preprocessor */ + if ((pc->GetType() == CT_PREPROC) || + ((pc->GetFlags() & PCF_IN_PREPROC) == 0)) + { + stage = 0; + break; + } + } + } + + if (stage == 2) + { + LOG_FMT(LINFO, "The whole file is covered by a #IF\n"); + pp_level_sub = 1; + } + + for (pc = Chunk::GetHead(); pc != NULL; pc = pc->GetNext()) + { + if (pc->GetType() != CT_PREPROC) + continue; + + if (pc->GetColumn() != 1) + { + /* Don't handle preprocessors that aren't in column 1 */ + LOG_FMT(LINFO, "%s: Line %d doesn't start in column 1 (%d)\n", + __func__, pc->GetOrigLine(), pc->GetColumn()); + continue; + } + + /* point into pp_str */ + if (pc->len == 2) + /* alternate token crap */ + pc->Str() = &alt_str[16]; + else + pc->Str() = &pp_str[16]; + + pp_level = pc->GetPpLevel() - pp_level_sub; + + if (pp_level < 0) + pp_level = 0; + else if (pp_level > 16) + pp_level = 16; + + /* Note that the indent is removed by default */ + if ((cpd.settings[UO_pp_indent].a & AV_ADD) != 0) + { + /* Need to add some spaces */ + pc->Str() -= pp_level; + pc->len += pp_level; + } + else if (cpd.settings[UO_pp_indent].a == AV_IGNORE) + { + tmp = (pc->GetOrigCol() <= 16) ? pc->GetOrigCol() - 1 : 16; + pc->Str() -= tmp; + pc->len += tmp; + } + + /* Add spacing by adjusting the length */ + if ((cpd.settings[UO_pp_space].a & AV_ADD) != 0) + pc->len += pp_level; + + next = pc->GetNext(); + + if (next != NULL) + reindent_line(next, pc->len + 1); + + LOG_FMT(LPPIS, "%s: Indent line %d to %d (len %d, next->col %d)\n", + __func__, pc->GetOrigLine(), GetPpLevel(), pc->len, next->GetColumn()); + } + } diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/02103-output.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/02103-output.cpp new file mode 100644 index 00000000..9c7aa714 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/02103-output.cpp @@ -0,0 +1,624 @@ +/** + * @file output.cpp + * Does all the output & comment formatting. + * + * $Id: output.cpp 510 2006-09-20 01:14:56Z bengardner $ + */ + +#include "uncrustify_types.h" +#include "prototypes.h" +#include "chunk.h" +#include <cstring> +#include <cstdlib> + + + +void add_char(char ch) + { + /* convert a newline into the LF/CRLF/CR sequence */ + if (ch == '\n') + { + fputs(cpd.newline, cpd.fout); + cpd.column = 1; + cpd.did_newline = 1; + } + else + { + fputc(ch, cpd.fout); + + if (ch == '\t') + cpd.column = next_tab_column(cpd.column); + else + cpd.column++; + } + } + +void add_text(const char *text) + { + char ch; + + while ((ch = *text) != 0) + { + text++; + add_char(ch); + } + } + +void add_text_len(const char *text, int len) + { + while (len-- > 0) + { + add_char(*text); + text++; + } + } + +/** + * Advance to a specific column + * cpd.column is the current column + * + * @param column The column to advance to + */ +void output_to_column(int column, bool allow_tabs) + { + int nc; + + cpd.did_newline = 0; + + if (allow_tabs) + { + /* tab out as far as possible and then use spaces */ + while ((nc = next_tab_column(cpd.column)) <= column) + add_text("\t"); + } + + /* space out the final bit */ + while (cpd.column < column) + add_text(" "); + } + +void output_indent(int column, int brace_col) + { + if ((cpd.column == 1) && (cpd.settings[UO_indent_with_tabs].n != 0)) + { + if (cpd.settings[UO_indent_with_tabs].n == 2) + brace_col = column; + + /* tab out as far as possible and then use spaces */ + int nc; + + while ((nc = next_tab_column(cpd.column)) <= brace_col) + add_text("\t"); + } + + /* space out the rest */ + while (cpd.column < column) + add_text(" "); + } + +void output_parsed(FILE *pfile) + { + Chunk *pc; + int cnt; + + output_options(pfile); + output_defines(pfile); + output_types(pfile); + + fprintf(pfile, "-=====-\n"); + fprintf(pfile, "Line Tag Parent Columns Br/Lvl/pp Flg Nl Text"); + + for (pc = Chunk::GetHead(); pc != NULL; pc = pc->GetNext()) + { + fprintf(pfile, "\n%3d> %13.13s[%13.13s][%2d/%2d/%2d][%d/%d/%d][%6x][%d-%d]", + pc->GetOrigLine(), get_token_name(pc->GetType()), + get_token_name(pc->GetParentType()), + pc->GetColumn(), pc->GetOrigCol(), pc->GetOrigColEnd(), + pc->GetBraceLevel(), pc->GetLevel(), pc->GetPpLevel(), + pc->GetFlags(), pc->GetNlCount(), pc->GetAfterTab()); + + if ((pc->GetType() != CT_NEWLINE) && (pc->len != 0)) + { + for (cnt = 0; cnt < pc->GetColumn(); cnt++) + fprintf(pfile, " "); + + fprintf(pfile, "%.*s", pc->len, pc->GetStr()); + } + } + + fprintf(pfile, "\n-=====-\n"); + fflush(pfile); + } + +void output_options(FILE *pfile) + { + int idx; + const option_map_value *ptr; + + fprintf(pfile, "-== Options ==-\n"); + + for (idx = 0; idx < UO_option_count; idx++) + { + ptr = get_option_name(idx); + + if (ptr != NULL) + { + if (ptr->GetType() == AT_BOOL) + { + fprintf(pfile, "%3d) %32s = %s\n", + ptr->id, ptr->name, + cpd.settings[ptr->id].b ? "True" : "False"); + } + else if (ptr->GetType() == AT_IARF) + { + fprintf(pfile, "%3d) %32s = %s\n", + ptr->id, ptr->name, + (cpd.settings[ptr->id].a == AV_ADD) ? "Add" : + (cpd.settings[ptr->id].a == AV_REMOVE) ? "Remove" : + (cpd.settings[ptr->id].a == AV_FORCE) ? "Force" : "Ignore"); + } + else if (ptr->GetType() == AT_LINE) + { + fprintf(pfile, "%3d) %32s = %s\n", + ptr->id, ptr->name, + (cpd.settings[ptr->id].le == LE_AUTO) ? "Auto" : + (cpd.settings[ptr->id].le == LE_LF) ? "LF" : + (cpd.settings[ptr->id].le == LE_CRLF) ? "CRLF" : + (cpd.settings[ptr->id].le == LE_CR) ? "CR" : "???"); + } + else /* AT_NUM */ + fprintf(pfile, "%3d) %32s = %d\n", + ptr->id, ptr->name, cpd.settings[ptr->id].n); + } + } + } + +/** + * This renders the chunk list to a file. + */ +void output_text(FILE *pfile) + { + Chunk *pc; + Chunk *prev; + int cnt; + int lvlcol; + bool allow_tabs; + + cpd.fout = pfile; + + for (pc = Chunk::GetHead(); pc != NULL; pc = pc->GetNext()) + { + if (pc->GetType() == CT_NEWLINE) + { + for (cnt = 0; cnt < pc->GetNlCount(); cnt++) + add_char('\n'); + + cpd.did_newline = 1; + cpd.column = 1; + LOG_FMT(LOUTIND, " xx\n"); + } + else if (pc->GetType() == CT_COMMENT_MULTI) + output_comment_multi(pc); + else if (pc->GetType() == CT_COMMENT_CPP) + pc = output_comment_cpp(pc); + else if (pc->len == 0) + /* don't do anything for non-visible stuff */ + LOG_FMT(LOUTIND, " <%d> -", pc->GetColumn()); + else + { + /* indent to the 'level' first */ + if (cpd.did_newline) + { + if (cpd.settings[UO_indent_with_tabs].n == 1) + { + lvlcol = 1 + (pc->GetBraceLevel() * cpd.settings[UO_indent_columns].n); + + if ((pc->GetColumn() >= lvlcol) && (lvlcol > 1)) + output_to_column(lvlcol, true); + } + + allow_tabs = (cpd.settings[UO_indent_with_tabs].n == 2) || + (pc->IsComment() && + (cpd.settings[UO_indent_with_tabs].n != 0)); + + LOG_FMT(LOUTIND, " %d> col %d/%d - ", pc->GetOrigLine(), pc->GetColumn(), cpd.column); + } + else + { + /* not the first item on a line */ + if (cpd.settings[UO_align_keep_tabs].b) + allow_tabs = pc->GetAfterTab(); + else + { + prev = pc->GetPrev(); + allow_tabs = (cpd.settings[UO_align_with_tabs].b && + ((pc->GetFlags() & PCF_WAS_ALIGNED) != 0) && + (((pc->GetColumn() - 1) % cpd.settings[UO_output_tab_size].n) == 0) && + ((prev->GetColumn() + prev->len + 1) != pc->GetColumn())); + } + + LOG_FMT(LOUTIND, " %d -", pc->GetColumn()); + } + + output_to_column(pc->GetColumn(), allow_tabs); + add_text_len(pc->GetStr(), pc->len); + cpd.did_newline = pc->IsNewline(); + } + } + } + +/** + * Given a multi-line comemnt block that starts in column X, figure out how + * much subsequent lines should be indented. + * + * The answer is either 0 or 1. + * + * The decision is based on: + * - the first line length + * - the second line leader length + * - the last line length + * + * If the first and last line are the same length and don't contain any alnum + * chars and (the first line len > 2 or the second leader is the same as the + * first line length), then the indent is 0. + * + * If the leader on the second line is 1 wide or missing, then the indent is 1. + * + * Otherwise, the indent is 0. + * + * @param str The comment string + * @param len Length of the comment + * @param start_col Starting column + * @return 0 or 1 + */ +static int calculate_comment_body_indent(const char *str, int len, int start_col) + { + int idx = 0; + int first_len = 0; + int last_len = 0; + int width = 0; + + /* find the last line length */ + for (idx = len - 1; idx > 0; idx--) + { + if ((str[idx] == '\n') || (str[idx] == '\r')) + { + idx++; + + while ((idx < len) && ((str[idx] == ' ') || (str[idx] == '\t'))) + idx++; + + last_len = len - idx; + break; + } + } + + /* find the first line length */ + for (idx = 0; idx < len; idx++) + { + if ((str[idx] == '\n') || (str[idx] == '\r')) + { + first_len = idx; + + while ((str[first_len - 1] == ' ') || (str[first_len - 1] == '\t')) + first_len--; + + /* handle DOS endings */ + if ((str[idx] == '\r') && (str[idx + 1] == '\n')) + idx++; + + idx++; + break; + } + } + + /* Scan the second line */ + width = 0; + + for (/* nada */; idx < len; idx++) + { + if ((str[idx] == ' ') || (str[idx] == '\t')) + { + if (width > 0) + break; + + continue; + } + + if ((str[idx] == '\n') || (str[idx] == '\r')) + /* Done with second line */ + break; + + /* Count the leading chars */ + if ((str[idx] == '*') || + (str[idx] == '|') || + (str[idx] == '\\') || + (str[idx] == '#') || + (str[idx] == '+')) + width++; + else + break; + } + + //LOG_FMT(LSYS, "%s: first=%d last=%d width=%d\n", __func__, first_len, last_len, width); + + /*TODO: make the first_len minimum (4) configurable? */ + if ((first_len == last_len) && ((first_len > 4) || first_len == width)) + return 0; + + return (width == 2) ? 0 : 1; + } + +/** + * Outputs the CPP comment at pc. + * CPP comment combining is done here + * + * @return the last chunk output'd + */ +Chunk *output_comment_cpp(Chunk *first) + { + int col = first->GetColumn(); + int col_br = 1 + (first->GetBraceLevel() * cpd.settings[UO_indent_columns].n); + + /* Make sure we have at least one space past the last token */ + if (first->GetParentType() == CT_COMMENT_END) + { + Chunk *prev = first->GetPrev(); + + if (prev != NULL) + { + int col_min = prev->GetColumn() + prev->len + 1; + + if (col < col_min) + col = col_min; + } + } + + /* Bump out to the column */ + output_indent(col, col_br); + + if (!cpd.settings[UO_cmt_cpp_to_c].b) + { + add_text_len(first->GetStr(), first->len); + return first; + } + + /* If we are grouping, see if there is something to group */ + bool combined = false; + + if (cpd.settings[UO_cmt_cpp_group].b) + { + /* next is a newline by definition */ + Chunk *next = first->GetNext(); + + if ((next != NULL) && (next->GetNlCount() == 1)) + { + next = next->GetNext(); + + /** + * Only combine the next comment if they are both at indent level or + * the second one is NOT at indent or less + * + * A trailing comment cannot be combined with a comment at indent + * level or less + */ + if ((next != NULL) && + (next->GetType() == CT_COMMENT_CPP) && + (((next->GetColumn() == 1) && (first->GetColumn() == 1)) || + ((next->GetColumn() == col_br) && (first->GetColumn() == col_br)) || + ((next->GetColumn() > col_br) && (first->GetParentType() == CT_COMMENT_END)))) + combined = true; + } + } + + if (!combined) + { + /* nothing to group: just output a single line */ + add_text_len("/*", 2); + + if ((first->GetStr()[2] != ' ') && (first->GetStr()[2] != '\t')) + add_char(' '); + + add_text_len(&first->GetStr()[2], first->len - 2); + add_text_len(" */", 3); + return first; + } + + Chunk *pc = first; + Chunk *last = first; + + /* Output the first line */ + add_text_len("/*", 2); + + if (combined && cpd.settings[UO_cmt_cpp_nl_start].b) + /* I suppose someone more clever could do this without a goto or + * repeating too much code... + */ + goto cpp_newline; + + goto cpp_addline; + + /* Output combined lines */ + while ((pc = pc->GetNext()) != NULL) + { + if ((pc->GetType() == CT_NEWLINE) && (pc->GetNlCount() == 1)) + continue; + + if (pc->GetType() != CT_COMMENT_CPP) + break; + + if (((pc->GetColumn() == 1) && (first->GetColumn() == 1)) || + ((pc->GetColumn() == col_br) && (first->GetColumn() == col_br)) || + ((pc->GetColumn() > col_br) && (first->GetParentType() == CT_COMMENT_END))) + { + last = pc; +cpp_newline: + add_char('\n'); + output_indent(col, col_br); + add_char(' '); + add_char(cpd.settings[UO_cmt_star_cont].b ? '*' : ' '); +cpp_addline: + + if ((pc->GetStr()[2] != ' ') && (pc->GetStr()[2] != '\t')) + add_char(' '); + + add_text_len(&pc->GetStr()[2], pc->len - 2); + } + } + + if (cpd.settings[UO_cmt_cpp_nl_end].b) + { + add_char('\n'); + output_indent(col, col_br); + } + + add_text_len(" */", 3); + return last; + } + +void output_comment_multi(Chunk *pc) + { + int cmt_col = pc->GetColumn(); + const char *cmt_str; + int remaining; + char ch; + Chunk *prev; + char line[1024]; + int line_len; + int line_count = 0; + int ccol; + int col_diff = 0; + int xtra = 1; + + prev = pc->GetPrev(); + + if ((prev != NULL) && (prev->GetType() != CT_NEWLINE)) + cmt_col = pc->GetOrigCol(); + else + col_diff = pc->GetOrigCol() - pc->GetColumn(); + + // fprintf(stderr, "Indenting1 line %d to col %d (orig=%d) col_diff=%d\n", + // pc->GetOrigLine(), cmt_col, pc->GetOrigCol(), col_diff); + + xtra = calculate_comment_body_indent(pc->GetStr(), pc->len, pc->GetColumn()); + + ccol = 1; + remaining = pc->len; + cmt_str = pc->GetStr(); + line_len = 0; + + while (remaining > 0) + { + ch = *cmt_str; + cmt_str++; + remaining--; + + /* handle the CRLF and CR endings. convert both to LF */ + if (ch == '\r') + { + ch = '\n'; + + if (*cmt_str == '\n') + { + cmt_str++; + remaining--; + } + } + + /* Find the start column */ + if (line_len == 0) + { + if (ch == ' ') + { + ccol++; + continue; + } + else if (ch == '\t') + { + ccol = calc_next_tab_column(ccol, cpd.settings[UO_input_tab_size].n); + continue; + } + else + { + //fprintf(stderr, "%d] Text starts in col %d\n", line_count, ccol); + } + } + + line[line_len++] = ch; + + /* If we just hit an end of line OR we just hit end-of-comment... */ + if ((ch == '\n') || (remaining == 0)) + { + line_count++; + + /* strip trailing tabs and spaces before the newline */ + if (ch == '\n') + { + line_len--; + + while ((line_len > 0) && + ((line[line_len - 1] == ' ') || + (line[line_len - 1] == '\t'))) + line_len--; + + line[line_len++] = ch; + } + + line[line_len] = 0; + + if (line_count == 1) + { + /* this is the first line - add unchanged */ + + /*TODO: need to support indent_with_tabs mode 1 */ + output_to_column(cmt_col, cpd.settings[UO_indent_with_tabs].b); + add_text_len(line, line_len); + } + else + { + /* This is not the first line, so we need to indent to the + * correct column. + */ + ccol -= col_diff; + + if (ccol < cmt_col) + ccol = cmt_col; + + if (line[0] == '\n') + { + /* Emtpy line - just a '\n' */ + if (cpd.settings[UO_cmt_star_cont].b) + { + output_to_column(cmt_col, cpd.settings[UO_indent_with_tabs].b); + add_text((xtra == 1) ? " *" : "*"); + } + + add_char('\n'); + } + else + { + /* If this doesn't start with a '*' or '|' */ + if ((line[0] != '*') && (line[0] != '|') && (line[0] != '#') && + (line[0] != '\\') && (line[0] != '+')) + { + output_to_column(cmt_col, cpd.settings[UO_indent_with_tabs].b); + + if (cpd.settings[UO_cmt_star_cont].b) + add_text((xtra == 1) ? " * " : "* "); + else + add_text(" "); + + output_to_column(ccol, cpd.settings[UO_indent_with_tabs].b); + } + else + output_to_column(cmt_col + xtra, cpd.settings[UO_indent_with_tabs].b); + + add_text_len(line, line_len); + } + } + + line_len = 0; + ccol = 1; + } + } + } diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10000-621_this-spacing.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10000-621_this-spacing.cpp new file mode 100644 index 00000000..bd28a5e8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10000-621_this-spacing.cpp @@ -0,0 +1,2 @@ +result = (Foo)this;
+result = (Foo)foo;
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10001-622_ifdef-indentation.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10001-622_ifdef-indentation.cpp new file mode 100644 index 00000000..c466b45c --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10001-622_ifdef-indentation.cpp @@ -0,0 +1,16 @@ +f()
+{
+ {
+ {
+ {
+# if 1
+ return 0;
+# endif
+
+ #if 1
+ return 0;
+ #endif
+ }
+ }
+ }
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10002-623_caret-spacing.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10002-623_caret-spacing.cpp new file mode 100644 index 00000000..5058ea4b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10002-623_caret-spacing.cpp @@ -0,0 +1,3 @@ +Foo^ foo = dynamic_cast<Bar^>(bar);
+Foo* foo = dynamic_cast<Bar*>(bar);
+x = a ^ b;
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10003-633_decl-in-func-typedef.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10003-633_decl-in-func-typedef.cpp new file mode 100644 index 00000000..4160ecca --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10003-633_decl-in-func-typedef.cpp @@ -0,0 +1,5 @@ +typedef void (*func)(); +typedef void (__stdcall *func)(); + +typedef std::vector<string *> *(*Finder )(std::string *); +typedef vector<std::string *> *(*Handler )(std::map< std::string *, vector *> *); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10004-634_extern-c-no-block.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10004-634_extern-c-no-block.cpp new file mode 100644 index 00000000..bb6b14fb --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10004-634_extern-c-no-block.cpp @@ -0,0 +1,9 @@ +extern "C" int* i;
+extern "C" { int* i; }
+int* i;
+extern "C" NSString* i;
+extern "C" { NSString* i; }
+NSString* i;
+
+__attribute__((visibility ("default"))) int* i;
+__attribute__((visibility ("default"))) NSString* i;
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10005-define-indentation.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10005-define-indentation.cpp new file mode 100644 index 00000000..24370df9 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10005-define-indentation.cpp @@ -0,0 +1,2 @@ + #define EXTRACTX360ACHIEVEMENT X360Achievement_INTERNAL& mapping = ExtractMonoObjectData<X360Achievement_INTERNAL>(self); /*huh?*/ \
+ const XACHIEVEMENT_DETAILS* achievement = xenon::Achievements::GetDetails(mapping.m_index);
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10006-dont-detab-strings.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10006-dont-detab-strings.cpp new file mode 100644 index 00000000..11352d82 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10006-dont-detab-strings.cpp @@ -0,0 +1,6 @@ +void f() {
+ auto x = "\ttest\t \t \t \t\t... ???";
+// *INDENT-OFF*
+ auto x = " test\t ... ???";
+// *INDENT-ON*
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10007-dont-process-defines.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10007-dont-process-defines.cpp new file mode 100644 index 00000000..10ac8d5b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10007-dont-process-defines.cpp @@ -0,0 +1,6 @@ +#define inline_2 __forceinline
+#define inline(i) inline_##i
+#define foo(x) inline(2) x()
+#define PLD(reg,offset) pld [reg, offset] \
+ pld [reg, offset] \
+ pld [reg, offset]
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10008-PR326_invalid-backslash-eol-csharp.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10008-PR326_invalid-backslash-eol-csharp.cpp new file mode 100644 index 00000000..dfd33ac7 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10008-PR326_invalid-backslash-eol-csharp.cpp @@ -0,0 +1,2 @@ +// test \
+// blah()
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10009-STUCK_macro-difficulties.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10009-STUCK_macro-difficulties.cpp new file mode 100644 index 00000000..ea1c724e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10009-STUCK_macro-difficulties.cpp @@ -0,0 +1,5 @@ +#define inline_2 __forceinline
+#define inline(i) inline_##i
+inline(2) f()
+{
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10020-macro_spaces.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10020-macro_spaces.cpp new file mode 100644 index 00000000..55a50766 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10020-macro_spaces.cpp @@ -0,0 +1,2 @@ +#if (WINVER < 0x0601)
+#endif
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10021-braces_align.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10021-braces_align.cpp new file mode 100644 index 00000000..40d966f5 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10021-braces_align.cpp @@ -0,0 +1,13 @@ +char *array_assign[2][4] =
+{
+ {
+ // foo
+ {"foo"},
+ {"foo@1"}, {"foo@2"}, {"foo@3"}
+ },
+ {
+ // bar
+ {"bar"},
+ {"bar@1"}, {"bar@2"}, {"bar@3"}
+ }
+};
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10022-foreach.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10022-foreach.cpp new file mode 100644 index 00000000..2862e6ef --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10022-foreach.cpp @@ -0,0 +1,4 @@ +void foo()
+{
+ for_each(it.begin(), it.end(), func);
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10023-for_auto.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10023-for_auto.cpp new file mode 100644 index 00000000..775031a5 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10023-for_auto.cpp @@ -0,0 +1,16 @@ +void foo() +{ + for (auto const& item : list) + bar(item); + for (const auto& item : list) + bar(item); + for (auto& item : list) + bar(item); + + auto* var = bar(); + auto& var = bar(); + auto var = bar(); + auto const* var = bar(); + auto const& var = bar(); + auto const var = bar(); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10024-ifcomment.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10024-ifcomment.cpp new file mode 100644 index 00000000..b41c5c6f --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10024-ifcomment.cpp @@ -0,0 +1,10 @@ +if (true) // indent_relative_single_line_comments = false
+ return;
+if (foo) // true
+{
+ bar(1); // action 1
+}
+else // false
+{
+ bar(2); // action 2
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10025-qtargs.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10025-qtargs.cpp new file mode 100644 index 00000000..01d94543 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10025-qtargs.cpp @@ -0,0 +1,13 @@ +void foo()
+{
+ QObject::connect(m_NetworkReply,
+ SIGNAL(error(QNetworkReply::NetworkError)),
+ this,
+ SLOT(NetworkReplyError(QNetworkReply::NetworkError)));
+ QObject::connect(m_NetworkReply,
+ SIGNAL(uploadProgress(qint64, qint64)),
+ this,
+ SLOT(NetworkReplyUploadProgress(qint64, qint64)));
+ connect(&m_SendReportThread, SIGNAL(ProgressChanged(size_t, size_t)),
+ SLOT(OnReportProgressChanged(size_t, size_t)));
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10026-gcc_case_ellipsis.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10026-gcc_case_ellipsis.cpp new file mode 100644 index 00000000..852360a4 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10026-gcc_case_ellipsis.cpp @@ -0,0 +1,15 @@ +void f(int i) +{ + switch(i) + { + case 1 ... 2: + { + break; + } + case 3 ... 5: + break; + + default: + break + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10027-Issue_3058.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10027-Issue_3058.cpp new file mode 100644 index 00000000..09e1dc92 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10027-Issue_3058.cpp @@ -0,0 +1,86 @@ +KJS::Value KJS::KateJSViewProtoFunc::call(KJS::ExecState *exec, KJS::Object &thisObj, const KJS::List &args) +{ + switch (id) + { + case KateJSView::SetCursorPositionReal: + { + return KJS::Boolean( view->setCursorPositionReal( args[0].toUInt32(exec), args[1].toUInt32(exec) ) ); + } + + // SelectionInterface goes in the view, in anticipation of the future + case KateJSView::Selection: + { + return KJS::String( view->selection() ); + } + } + + return KJS::Undefined(); +} + +void KateXmlIndent::getLineInfo (uint line, uint &prevIndent, int &numTags, + uint &attrCol, bool &unclosedTag) +{ + for(pos = 0; pos < len; ++pos) { + int ch = text.at(pos).unicode(); + switch(ch) { + case '<': + { + ++numTags; + break; + } + + // don't indent because of DOCTYPE, comment, CDATA, etc. + case '!': + { + if(lastCh == '<') --numTags; + break; + } + + // don't indent because of xml decl or PI + case '?': + { + if(lastCh == '<') --numTags; + break; + } + } + } +} + +static YYSIZE_T yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + for (;;) + switch (*++yyp) + { + case '\\': + { + if (*++yyp != '\\') + yyres[yyn] = *yyp; + } + /* Fall through. */ + default: + { + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + } + } + } + return yystpcpy (yyres, yystr) - yyres; +} + +Value RegExpProtoFuncImp::call(ExecState *exec, Object &thisObj, const List &args) +{ + if (!thisObj.inherits(&RegExpImp::info)) { + if (thisObj.inherits(&RegExpPrototypeImp::info)) { + switch (id) { + case ToString: + { return String("//"); // FireFox returns /(?:)/ + } + } + } + return err; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10028-gcc_case_ellipsis.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10028-gcc_case_ellipsis.cpp new file mode 100644 index 00000000..852360a4 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10028-gcc_case_ellipsis.cpp @@ -0,0 +1,15 @@ +void f(int i) +{ + switch(i) + { + case 1 ... 2: + { + break; + } + case 3 ... 5: + break; + + default: + break + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10029-gcc_case_ellipsis.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10029-gcc_case_ellipsis.cpp new file mode 100644 index 00000000..e2d8ef8a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10029-gcc_case_ellipsis.cpp @@ -0,0 +1,15 @@ +void f(int i) +{ + switch(i) + { + case 1 ... 2: + { + break; + } + case 3 ... 5: + break; + + default: + break + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10047-UNI-1334.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10047-UNI-1334.cpp new file mode 100644 index 00000000..9a856f91 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10047-UNI-1334.cpp @@ -0,0 +1,7 @@ +// This should not be screwing with the trailing backslash and indentation of contents!
+// unless it's on the first line where it's controlled by sp_before_nl_cont which we have set on add.
+// Devs should expect misalignment of the nl_cont tokens because we're not messing with the nl_cont from the define body.
+
+#define MY_DEFINE(param1, param2) \
+ my_long_foo_function(param1);\
+ bar(param2);
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10048-UNI-1335.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10048-UNI-1335.cpp new file mode 100644 index 00000000..891b945a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10048-UNI-1335.cpp @@ -0,0 +1,9 @@ +// Change in Configuration\UnityConfigure.h:
+
+ #define FOO_MACRO 0 /////@TODO: COMMENT?????
+// ^^^ space removed after 0
+
+// Foo\Bar\Baz\Fizz\Test.cpp
+
+ #define BAR_MACRO FOO_BAR_MACRO //FOO_BAR_BAZ_NONE
+// ^^^ space removed after _MACRO
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10050-UNI-1337.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10050-UNI-1337.cpp new file mode 100644 index 00000000..59635c19 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10050-UNI-1337.cpp @@ -0,0 +1,9 @@ +// Runtime\Allocator\BucketAllocator.cpp
+
+void foo()
+{
+ void* p1 = new(ptr) Block(bucketsSize);
+ // becomes...
+ void* p1 = new(ptr)Block(bucketsSize);
+ // missing space after ')'
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10052-UNI-1339.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10052-UNI-1339.cpp new file mode 100644 index 00000000..255db223 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10052-UNI-1339.cpp @@ -0,0 +1,2 @@ +auto c = a < b >> 1;
+auto c = a < b;
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10053-UNI-1340.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10053-UNI-1340.cpp new file mode 100644 index 00000000..2a96aa31 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10053-UNI-1340.cpp @@ -0,0 +1,3 @@ +namespace dudeNamespace { class ForwardFooClass; }
+
+namespace dudeNamespace { class ForwardFooClass; }
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10054-UNI-1344.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10054-UNI-1344.cpp new file mode 100644 index 00000000..43c4429e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10054-UNI-1344.cpp @@ -0,0 +1,20 @@ +// Asm blocks have their own special indentation where lables must remain at indent 0 relative to __asm__ block.
+// They few ways of being opened and closed depending on the compiler.
+// For now, we can at least detect and ignore the contents, including alignment.
+
+// Workaround: can always fall back on disable/enable_processing_cmt.
+
+void foo()
+{
+ int head, bar;
+ __asm__ __volatile__
+ (
+ "movq %0,%%xmm0\n\t" /* asm template */
+ "0:\n\t"
+ "bar %0, [%4]\n\t" // in template
+ "1:\n\t"
+ : "=a", (bar)
+ : "=&b", (&head), "+m", (bar)
+ : "cc"
+ );
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10056-UNI-1346.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10056-UNI-1346.cpp new file mode 100644 index 00000000..af875c3e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10056-UNI-1346.cpp @@ -0,0 +1,24 @@ +// Fix doxygen support to include member groups
+
+// See http://www.stack.nl/~dimitri/doxygen/manual/grouping.html#memgroup
+
+// Note that the spec says three slashes, but their example has only two slashes.
+
+// Once this is done, we can try turning on sp_cmt_cpp_start in Uncrustify.Common-CStyle.cfg.
+
+/// Bucket allocator is used for allocations up to 64 bytes of memory.
+/// It is represented by 4 blocks of a fixed-size "buckets" (for allocations of 16/32/48/64 bytes of memory).
+/// Allocation is lockless, blocks are only growable.
+class Class
+{
+public:
+ ///@{ Doxygen group 1
+ virtual void* Foo();
+ virtual void* Bar();
+ ///@}
+
+ //@{ Doxygen group 2
+ virtual void* Foo();
+ virtual void* Bar();
+ //@}
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10057-UNI-1347.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10057-UNI-1347.cpp new file mode 100644 index 00000000..ec8f350b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10057-UNI-1347.cpp @@ -0,0 +1,10 @@ +// Extern "C" blocks need an alignment option somehow. I can do a "set NAMESPACE extern" in the cfg but that will probably screw other stuff up.
+
+// See External\Audio\NativePluginDemo\NativeCode\TeleportLib.h for an example. Yeah it's in external (so have to force-format it) but it's a good case.
+
+// (Actually it's in https://bitbucket.org/Unity-Technologies/nativeaudioplugins, but just published here to external)
+
+extern "C"
+{
+ typedef EXPORT_API int (*Foo)(int arg);
+};
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10060-UNI-1350.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10060-UNI-1350.cpp new file mode 100644 index 00000000..7353e915 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10060-UNI-1350.cpp @@ -0,0 +1,5 @@ +// Can't set sp_inside_braces_struct=add otherwise Uncrustify starts applying it to initializers combined with old-C-style struct usage.
+
+struct in_addr addr = {0};
+// ... --> ...
+struct in_addr addr = { 0 };
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10062-UNI-1356.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10062-UNI-1356.cpp new file mode 100644 index 00000000..c70ca61d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10062-UNI-1356.cpp @@ -0,0 +1,27 @@ +// Hi,
+// When using "space only" and "indent continue", I notice a wrong indentation in C language (at least)
+// function call when the retrun value is assigned to a variable and the call is split in two or more line.
+// In that case the indent is twice the indent set in "indent_continue"
+// This only appears when "indent_with_tabs" is set to 0 "space only" and 1
+// "indent with tabs to brace level, align with spaces"
+// Version tested:
+// 0.59: good indentation
+// 0.60: wrong indentation
+// master (sha1 fc5228e): wrong indentation
+// Here are some details about thats issue:
+// orignal code
+// The long line are manually split and not indented to test uncrustify indent
+
+int main (int argc, char *argv[])
+{
+ double a_very_long_variable = test (foobar1, foobar2, foobar3, foobar4,
+ foobar5, foobar6);
+
+ double a_other_very_long = asdfasdfasdfasdfasdf + asdfasfafasdfa +
+ asdfasdfasdf - asdfasdf + 56598;
+
+ testadsfa (dfasdf, fdssaf, dsfasdf, sadfa, sadfas, fsadfa,
+ aaafsdfa, afsd, asfdas, asdfa, asfasdfa, afsda, asfdasfds, asdfasf);
+
+ return 0;
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10063-UNI-1358.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10063-UNI-1358.cpp new file mode 100644 index 00000000..120aa9c4 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10063-UNI-1358.cpp @@ -0,0 +1,15 @@ +// MIDL_INTERFACE includes 'class' in its definition but is not tokenised as such
+// A pretty common pattern would be nice to have proper formatting.
+
+EXTERN_C const IID IID_IFileDialogEvents;
+
+MIDL_INTERFACE("973510db-7d7f-452b-8975-74a85828d354")
+IFileDialogEvents : public IUnknown
+{
+public:
+ virtual HRESULT STDMETHODCALLTYPE OnStuff(
+ /* [in] */ __RPC__in_opt IFileDialog *pfd,
+ /* [in] */ __RPC__in_opt IShellItem *psi,
+ /* [out] */ __RPC__out FDE_SHAREVIOLATION_RESPONSE *pGoodResponse,
+ /* [out] */ __RPC__out FDE_OVERWRITE_RESPONSE *pBadResponse) = 0;
+};
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10069-UNI-1980.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10069-UNI-1980.cpp new file mode 100644 index 00000000..97940716 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10069-UNI-1980.cpp @@ -0,0 +1,8 @@ +// First: scan more FAKE_FUNCTION diffs and see how common this problem is.
+
+// The & should be attached to RefType because it's in a function prototype. Most likely being detected as ARITH.
+
+// We need to figure out how to support this with some setting in our cpp cfg for uncrustify.
+
+FAKE_FUNCTION(Boo, RefType& (void));
+FAKE_FUNCTION(Foo, (MyAwesomeType* (void)));
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10070-UNI-1981.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10070-UNI-1981.cpp new file mode 100644 index 00000000..d4f74dc3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10070-UNI-1981.cpp @@ -0,0 +1,16 @@ +#if DOXYGEN
+class Class
+#else
+struct Struct
+#endif
+{
+ UInt32 m_myAwesomeMember1 : kEnumValue
+ UInt32 m_myAwesomeMember11 : kEnumValue
+ UInt32 m_myAwesomeMember111 : 1;
+ UInt32 m_myAwesomeMember1111 : 1;
+ UInt32 m_myAwesomeMember11111 : 1;
+ UInt32 m_myAwesomeMember111111 : 1;
+ UInt32 m_myAwesomeMember1111111 : 1;
+ UInt32 m_myAwesomeMember11111111 : kEnumValue
+ UInt32 m_myAwesomeMember11111111 : kEnumValue
+};
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10071-UNI-1983.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10071-UNI-1983.cpp new file mode 100644 index 00000000..e7d9de6d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10071-UNI-1983.cpp @@ -0,0 +1 @@ +typedef HRESULT (WINAPI *Foo)(const void* pData, SIZE_T size, UINT flags, const char* szStr, D3D10BlobHack** ppBlob);
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10079-UNI-9650.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10079-UNI-9650.cpp new file mode 100644 index 00000000..0d6cdb46 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10079-UNI-9650.cpp @@ -0,0 +1,7 @@ +// make sure that we ignore sp_inside_angle=remove if it will cause a digraph to be created
+
+ops.pProgressCallback = reinterpret_cast< ::ProgressCallback*>(progressCallback);
+ops.pProgressCallback = reinterpret_cast< ::ProgressCallback*>(progressCallback);
+ops.pProgressCallback = reinterpret_cast<::ProgressCallback*>(progressCallback);
+ops.pProgressCallback = reinterpret_cast<ProgressCallback*>(progressCallback);
+ops.pProgressCallback = reinterpret_cast<ProgressCallback*>(progressCallback);
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10080-UNI-10496.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10080-UNI-10496.cpp new file mode 100644 index 00000000..81122be8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10080-UNI-10496.cpp @@ -0,0 +1,11 @@ +friend class ::GameObject;
+void GameObject::Foo();
+
+auto x = ::GlobalFunc();
+
+friend void ::testing::PrintDebugInformationForFakesInUse();
+
+template<class TransferFunction>
+void ::DateTime::Transfer(TransferFunction & transfer)
+{
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10100-issue_564.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10100-issue_564.cpp new file mode 100644 index 00000000..ac5fbef3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10100-issue_564.cpp @@ -0,0 +1,3 @@ +CGPathMoveToPoint (bottomArrow, NULL, round(aPoint.x) + .5/self.contentsScale -3, aPoint.y - aLength+1 +4);
+CGPathAddLineToPoint(bottomArrow, NULL, round(aPoint.x) + .5/self.contentsScale, aPoint.y - aLength+1 );
+CGPathAddLineToPoint(bottomArrow, NULL, round(aPoint.x) + .5/self.contentsScale +3, aPoint.y - aLength+1 +4);
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10101-issue_574.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10101-issue_574.cpp new file mode 100644 index 00000000..6621d455 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10101-issue_574.cpp @@ -0,0 +1,14 @@ +class A
+{
+// crash (two parameter, 2nd string parameter has space)
+ void check(const QObject *object, const QStringList &strList=QStringList(QString(QLatin1String("one two"))));
+// no crash (two parameter, 2nd string parameter has no space)
+ void check(const QObject *object, const QStringList &strList= QStringList(QString(QLatin1String("one"))));
+// no crash (removed QLatin1String)
+ void check(const QObject *object, const QStringList &strList =QStringList(QString(("one two"))));
+// no crash (removed QString(QLatin1String))
+ void check(const QObject *object, const QStringList &strList = QStringList());
+// no crash (removed 1st parameter only)
+ void check(const QStringList &strList = QStringList(QString(QLatin1String("one two"))));
+};
+int A=5;
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10102-issue_574.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10102-issue_574.cpp new file mode 100644 index 00000000..0f3b7da3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10102-issue_574.cpp @@ -0,0 +1,14 @@ +class A
+{
+// crash (two parameter, 2nd string parameter has space)
+ void check(const QObject *object, const QStringList &strList =QStringList(QString(QLatin1String("one two"))));
+// no crash (two parameter, 2nd string parameter has no space)
+ void check(const QObject *object, const QStringList &strList =QStringList(QString(QLatin1String("one"))));
+// no crash (removed QLatin1String)
+ void check(const QObject *object, const QStringList &strList =QStringList(QString(("one two"))));
+// no crash (removed QString(QLatin1String))
+ void check(const QObject *object, const QStringList &strList =QStringList());
+// no crash (removed 1st parameter only)
+ void check(const QStringList &strList =QStringList(QString(QLatin1String("one two"))));
+};
+int A =5;
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10103-issue_574.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10103-issue_574.cpp new file mode 100644 index 00000000..b87e76fe --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10103-issue_574.cpp @@ -0,0 +1,14 @@ +class A
+{
+// crash (two parameter, 2nd string parameter has space)
+ void check(const QObject *object, const QStringList &strList= QStringList(QString(QLatin1String("one two"))));
+// no crash (two parameter, 2nd string parameter has no space)
+ void check(const QObject *object, const QStringList &strList= QStringList(QString(QLatin1String("one"))));
+// no crash (removed QLatin1String)
+ void check(const QObject *object, const QStringList &strList= QStringList(QString(("one two"))));
+// no crash (removed QString(QLatin1String))
+ void check(const QObject *object, const QStringList &strList= QStringList());
+// no crash (removed 1st parameter only)
+ void check(const QStringList &strList= QStringList(QString(QLatin1String("one two"))));
+};
+int A= 5;
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10566-issue_1752.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10566-issue_1752.cpp new file mode 100644 index 00000000..8e16cfa3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/10566-issue_1752.cpp @@ -0,0 +1,3 @@ +#define WARN_IF(EXP) \ + do { if (EXP) \ + fprintf (stderr, "Warning: " #EXP "\n"); } \ diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/11000-UNI-12046.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/11000-UNI-12046.cpp new file mode 100644 index 00000000..5ffc0da9 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/11000-UNI-12046.cpp @@ -0,0 +1,2 @@ +//The space shouldn't be removed. This is a STRUCT +struct ALIGN_TYPE(16) StructName; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/20002-UNI-32657.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/20002-UNI-32657.cpp new file mode 100644 index 00000000..eb7655da --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/20002-UNI-32657.cpp @@ -0,0 +1,9 @@ +void UNITY_INTERFACE_API XREnvironment::DepthSetNumberOfPointsImpl(
+ IUnityXRDepthDataAllocator* allocator,
+ size_t numPoints)
+{
+}
+
+UnityXRRaycastHit* (UNITY_INTERFACE_API* Raycast_SetNumberOfHits)(
+ IUnityXRRaycastAllocator* allocator,
+ size_t numHits);
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/20011-UNI-38381.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/20011-UNI-38381.cpp new file mode 100644 index 00000000..701b55b2 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/20011-UNI-38381.cpp @@ -0,0 +1,5 @@ +#if UNITY_DEFER_GRAPHICS_JOBS_SCHEDULE +void GfxDevice::ScheduleAsyncJob(AsyncCommandJobFunc* jobFunc, GfxDeviceAsyncCommand* cmd, const JobFence& depends, JobBatchDispatcher& dispatcher) +#else +JobFence& GfxDevice::ScheduleAsyncJob(AsyncCommandJobFunc* jobFunc, GfxDeviceAsyncCommand* cmd, const JobFence& depends, JobBatchDispatcher& dispatcher) +#endif // #if UNITY_DEFER_GRAPHICS_JOBS_SCHEDULE diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30000-cout.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30000-cout.cpp new file mode 100644 index 00000000..f099751f --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30000-cout.cpp @@ -0,0 +1,17 @@ +void foo() +{ + cout.setf(ios::showpoint); + cout.setf(ios::floatfield, ios::fixed); + + what.the.hell.cout << "hello" + << "world!" + << "This" + << "is a" + << "test!"; + + *aaaaaa = (bbbbb(cccccPtr->ddd) & YYYYYYYYYYYYYYYYYYYYYYYY) | + ((bbbbb(cccccPtr->nnnnnnnn) << ZZZZZZZZZZZZZZZZZZZZZZZZZZZ) + & WWWWWWWWWWWWWWWWWWWWWWWWWW) | ((bbbbb(cccccPtr->hhhhhhhhhhhhhh) + << FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) + & EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30001-alt_tokens.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30001-alt_tokens.cpp new file mode 100644 index 00000000..02083b88 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30001-alt_tokens.cpp @@ -0,0 +1,7 @@ +// how to use digraps: +// https://en.wikipedia.org/wiki/Digraphs_and_trigraphs + +int main(int argc, char *argv[]) <% // { +int array<: 10 :>; // int array[10]; +%> // } + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30002-constructor.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30002-constructor.cpp new file mode 100644 index 00000000..f7cbb30d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30002-constructor.cpp @@ -0,0 +1,31 @@ + +IMPLEMENT_DYNAMIC(CPropertiesDlg, CDialog) +CPropertiesDlg::CPropertiesDlg(CPtcMsgSimControlModule *pcmPtcMsg, + CWnd *pParent /*=NULL*/) : + CDialog(CPropertiesDlg::IDD, pParent), + m_pspRouter(pcmPtcMsg), + m_pspScm(pcmPtcMsg) +{ + m_pcmPtcMsg = pcmPtcMsg; +} + +CPropertiesDlg::~CPropertiesDlg() +{ +} + +void CPropertiesDlg::DoDataExchange(CDataExchange *pDX) +{ + CDialog::DoDataExchange(pDX); +} + +CFooBar::CFooBar(CWnd *pParent /*=NULL*/) + : CDialog(CFooBar::IDD, pParent), + m_parent(pParent) +{ + //{{AFX_DATA_INIT(CRouterBrowser) + //}}AFX_DATA_INIT + + m_nFoo = 0; + m_nBar = 0; +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30003-strings.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30003-strings.cpp new file mode 100644 index 00000000..acef8744 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30003-strings.cpp @@ -0,0 +1,58 @@ +void foo() +{ + BSTR test = L"SID"; + CHAR s[] = "This is a \"test\""; + CHAR ch = 'a'; +} + + +/* The 'u8', 'u', and 'U' prefixes */ +const char *s1 = u8"I'm a UTF-8 string."; +const char16_t *s2 = u"This is a UTF-16 string."; +const char32_t *s3 = U"This is a UTF-32 string."; + +const char c1 = u8'1'; +const char16_t c2 = u'2'; +const char32_t c3 = U'4'; +const wchar_t c4 = L'w'; +const char16_t u = u'\u007f'; + +/* The 'R' and 'R"delim(' prefixes */ +const char *r1 = R"(Xhe String Data \ Stuff " )"; +const char *r2 = R"delimiter(The String Data \ Stuff ")delimiter"; + +/* Multiline string */ +auto foo = R"FOO"( + some + text + and + more + text +)FOO""; + +/* Combo */ +const char *c1 = u8R"XXX(I'm a "raw UTF-8" string.)XXX"; +const char16_t *c2 = uR"*(This is a "raw UTF-16" string.)*"; +const char32_t *c3 = UR"(This is a "raw UTF-32" string.)"; + +/* user-defined */ +OutputType operator "" _Suffix(unsigned long long); +OutputType operator "" _Suffix(long double); + +OutputType some_variable = 1234_Suffix; // uses the first function +OutputType another_variable = 3.1416_Suffix; // uses the second function + +OutputType operator "" _Suffix(const char *string_values, size_t num_chars); +OutputType operator "" _Suffix(const wchar_t *string_values, size_t num_chars); +OutputType operator "" _Suffix(const char16_t *string_values, size_t num_chars); +OutputType operator "" _Suffix(const char32_t *string_values, size_t num_chars); + +OutputType some_variable = "1234"_Suffix; //Calls the const char * version +OutputType some_variable = u8"1234"_Suffix; //Calls the const char * version +OutputType some_variable = L"1234"_Suffix; //Calls the const wchar_t * version +OutputType some_variable = u"1234"_Suffix; //Calls the const char16_t * version +OutputType some_variable = U"1234"_Suffix; //Calls the const char32_t * version + +/* Some stuff that should NOT be detected as a C++0x user-defined literal */ +sscanf(text, "%" SCNx64, &val); +printf("Val=%" PRIx64 "\n", val); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30010-class.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30010-class.h new file mode 100644 index 00000000..2293d9c8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30010-class.h @@ -0,0 +1,52 @@ +#ifndef _FOO_BAR_H_INCLUDED_ +#define _FOO_BAR_H_INCLUDED_ + +class CFooBarDlg : public CDialog +{ +// Construction + public: + CFooBarDlg(CFooBar *pDataMan, + CWnd *pParent=NULL); + virtual ~CFooBarDlg(); + + void Initialize(BYTE nDelay=100); + + UINT GetCount() { return(m_nCount); } + + void SetCount(int count=1) + { + if ((count > 0) && (count < MAX_COUNT)) + { + m_nCount = count; + } + } + + // Dialog Data + //{{AFX_DATA(CATCSMgrDlg) + enum { IDD = IDD_ATCS_MGR_DLG }; + //}}AFX_DATA + + protected: + int m_nCount; + +// Overrides +// ClassWizard generated virtual function overrides +//{{AFX_VIRTUAL(CATCSMgrDlg) + protected: + virtual void DoDataExchange(CDataExchange *pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation + + // Generated message map functions + //{{AFX_MSG(CATCSMgrDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnTimer(UINT nIDEvent); + afx_msg void OnBtnSendFooBar(); + afx_msg void OnSelchangeFooBarCombo(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +#endif /* _FOO_BAR_H_INCLUDED_ */ + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30011-misc.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30011-misc.cpp new file mode 100644 index 00000000..9e3b8c5b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30011-misc.cpp @@ -0,0 +1,60 @@ + +/* Not detected as a prototype? Spacing wrong. */ +static struct my_entry *get_first_entry(const CHAR *blah); +static CFooo::entry *get_next_entry(const CHAR *blah); +static struct my_entry *get_next_entry(const CHAR *blah); + +/* Not handling prototype params: */ +typedef void (*function_name)(my_t *p_my, int foo); +typedef void (*function_name)(my_t *, int); + +typedef enum +{ + one = 1, + three = 3, + five_hundred = 5, + a_really_really_big_number = 6, + two = 7, + a_really_really_really_big_number = 8, +} yuck_t; + +const char *names[] = +{ + one = "one", + three = "three", + five_hundred = "five_hundred", + a_really_really_big_number = "a_really_really_big_number", + two = "two", + a_really_really_really_big_number = "a_really_really_really_big_number", +}; + +bool foo(char c) +{ + xWindow *pWindow = ::RelatedWindow(); + + /* space between ] and ( */ + function_list[idx](param); + + /* Indenting with multiple members: */ + sass.asdfvas->asdfasd[asdfasdf]. + asdfasdf = 5; + + ::asdasda::adasd:: + asdfasdf = 5; + + dookie::wookie << "asd" + << "bag" + << "sag"; + + sp_sign = 4 - -5; + sp_sign = -sp_sign; + sp_sign = 4 + +7; + sp_sign = +sp_sign; + sp_sign = 4 + +sp_sign; +} + +#ifndef abc + +#define abc 123 /* some comment */ + +#endif /* another comment diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30012-misc2.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30012-misc2.cpp new file mode 100644 index 00000000..62a51621 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30012-misc2.cpp @@ -0,0 +1,58 @@ +/* + I tried to modify the spaces when using casts like static_cast etc. by + using sp_before_angle, sp_after_angle and sp_inside_angle. Even setting + all of those options to remove results in the following: + */ + +myvar = dynamic_cast<MyClass<T>*>(other); +// expected: +//myvar = dynamic_cast<MyClass<T>*>(other); + +/* + Sometime pointers and references are still not detected correctly in + special cases - i guess. + */ +//When using "sp_before_ptr_star = remove" the result is: +typedef std::list<StreamedData*>::iterator iterator; +//typedef std::list<StreamedData *>::iterator iterator; +//------------------------------^ This space show not be there + +typedef void (T::*Routine)(void); + +//Similar with "sp_before_byref = remove": +unsigned long allocate(unsigned long size, void*& p); + +//unsigned long allocate(unsigned long size, void* & p); +//------------------------------------------------^ The same here + +void foo(void) +{ + List<byte> bob = new List<byte>(); + + /* Align assignments */ + align_assign(Chunk::GetHead(), + cpd.settings [UO_align_assign_span].n, + cpd.settings [UO_align_assign_thresh].n); +} + +Args::Args(int argc, char**argv) +{ + m_count = argc; + m_values = argv; + int len = (argc >> 3) + 1; + m_used = new UINT8 [len]; + if (m_used != NULL) { + memset(m_used, 0, len); + } +} + +void Args(int argc, char**argv) +{ + m_count = argc; + m_values = argv; + int len = (argc >> 3) + 1; + m_used = new UINT8 [len]; + if (m_used != NULL) { + memset(m_used, 0, len); + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30013-sim.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30013-sim.h new file mode 100644 index 00000000..835ae666 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30013-sim.h @@ -0,0 +1,48 @@ +namespace ns { +template<typename T, template<typename>class TOtherClass> +class Example +{ + int foo; +} + +} + +template<class T> +class Example +{ + T getValue() const; + + /** A pointer to a T returning function in the software environment */ + T (FunctionProvider::* pF)(); + +}; + + +#if !defined(EVERYTHING_OK) +#error Define EVERYTHING_OK if you would like to compile your code \ + or not if you would like to stop! +#endif + + +template<class V> +class Example +{ + Vector2<V>() : + x(1), + y(1) + {} + + Vector2<double>() : + x(1.0), + y(1.0) + {} + + Vector2<float>() : + x(1.0f), + y(1.0f) + {} + + V x; + V y; + +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30014-ctor-var.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30014-ctor-var.cpp new file mode 100644 index 00000000..2551d8bd --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30014-ctor-var.cpp @@ -0,0 +1,4 @@ +int foo() +{ + TextBody textbody(GetBody().GetText()); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30015-exception.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30015-exception.cpp new file mode 100644 index 00000000..75a4f97e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30015-exception.cpp @@ -0,0 +1,40 @@ +#include <iostream> + + +void foo() +{ + char *buf; + + try + { + buf = new unsigned char[1024]; + if (buf == 0) + { + throw "Out of memory"; + } + } + catch (char *str) + { + cout << "Exception: " << str << '\n'; + } +} + +void bar() +{ + char *buf; + + try + { + buf = new unsigned char[1024]; + if (buf == 0) + { + throw "Out of memory"; + } + } + catch (char *str) + { + cout << "Exception: " << str << '\n'; + } +} + + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30016-custom-open.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30016-custom-open.cpp new file mode 100644 index 00000000..234f5591 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30016-custom-open.cpp @@ -0,0 +1,26 @@ + +void className::set(const objectName& obj) +{ + statement1(); + MACRO_BEGIN_STUFF(param) + DOSTUFF(params) + MACRO_ELSE_STUFF() + DOMORESTUFF(moreparams) + junk = 1; + MACRO2_BEGIN_STUFF + junk += 3; + MACRO2_ELSE_STUFF + junk += 4; + MACRO2_END_STUFF + DOLASTSTUFF(lastparams) + MACRO_END_STUFF() + statement2(); +} + + +MACRO2_BEGIN_STUFF + // comment +MACRO2_ELSE_STUFF + /* Comment */ +MACRO2_END_STUFF + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30017-custom-open.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30017-custom-open.cpp new file mode 100644 index 00000000..6acd92e5 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30017-custom-open.cpp @@ -0,0 +1,26 @@ + +void className::set(const objectName& obj) +{ + statement1(); + MACRO_BEGIN_STUFF(param) + DOSTUFF(params) + MACRO_ELSE_STUFF() + DOMORESTUFF(moreparams) + junk = 1; + MACRO2_BEGIN_STUFF + junk += 3; + MACRO2_ELSE_STUFF + junk += 4; + MACRO2_END_STUFF + DOLASTSTUFF(lastparams) + MACRO_END_STUFF() + statement2(); +} + + +MACRO2_BEGIN_STUFF + // comment +MACRO2_ELSE_STUFF + /* Comment */ +MACRO2_END_STUFF + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30018-class-addr.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30018-class-addr.h new file mode 100644 index 00000000..042579dc --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30018-class-addr.h @@ -0,0 +1,11 @@ +class C +{ + public: + A *B; + C& D; + const C& D; + static C& D; + public C& D; + E = c & D; +}; + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30019-wacky-template.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30019-wacky-template.cpp new file mode 100644 index 00000000..cf6e5c87 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30019-wacky-template.cpp @@ -0,0 +1,12 @@ +template<typename flt_t> +template<typename gamma_t, typename gamma2_t, typename alpha_t, typename + beta_t, typename tail_extrinsic_t, typename rec_tail_t> + +void turbo_dec_1_15<flt_t>::compute_tail(gamma_t const& gamma, + gamma2_t const& gamma2, + alpha_t const& alpha, + beta_t const& beta, + tail_extrinsic_t& tail_extrinsic, + rec_tail_t const& rec_tail) +{ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30020-bool.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30020-bool.cpp new file mode 100644 index 00000000..9f9e55b2 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30020-bool.cpp @@ -0,0 +1,11 @@ +bool foo(char c) +{ + if (c == 'a') + { + return(true); + } + else + { + return(false); + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30021-byref.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30021-byref.cpp new file mode 100644 index 00000000..87f6c44a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30021-byref.cpp @@ -0,0 +1,49 @@ +bool foo(int& idx) +{ + if (idx < m_count) + { + idx++; + return(m_bool[idx - 1]); + } + return(false); +} + +class Foo { + public: + Foo(); + Foo(const Foo& f); +}; + +class NS::Foo { + public: + Foo(Bar& b); +}; + +template<class T> class ListManager +{ + protected: + T head; + + public: + ListManager() + { + head.next = head.prev = &head; + } + + ListManager(const ListManager& ref) + { + head.next = head.prev = &head; + } +} + +const Foo& Foo::operator ==(Foo& me) +{ + ::sockaddr *ptr = (::sockaddr *)&host; + + return(me); +} + +MyType& MyClass::myMethode() +{ + const MyType& t = getSomewhere(); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30022-extern_c.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30022-extern_c.h new file mode 100644 index 00000000..a97d93b8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30022-extern_c.h @@ -0,0 +1,31 @@ +#ifndef cRecordMarking_HEADER +#define cRecordMarking_HEADER + +#include "DIS/cPduSnapshot.h" + +typedef void *disConnectionH; + +#ifdef __cplusplus +extern "C" +#endif +{ + disConnectionH createDisConnection(); + + void setAddressAndPort_DisConnect(disConnectionH record, const char *addr); + + /* Open network connection */ + int open_DisConnect(disConnectionH record); + + /* Close network connection */ + void close_DisConnect(disConnectionH record); + + /* Send one pdu */ + int sendPdu_DisConnect(disConnectionH record, pduSnapshotH pdu); + + /* Receive one pdu */ + int recvPdu_DisConnect(disConnectionH record, pduSnapshotH pdu); + + void FreeDisConnection(disConnectionH connection); +} +#endif + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30023-templates.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30023-templates.cpp new file mode 100644 index 00000000..960e0b82 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30023-templates.cpp @@ -0,0 +1,197 @@ +#include <list> +#include <map> +#include <vector> + +#define MACRO(T) f<T>() + +class MyClass +{ + public: + std::map<int, bool> someData; + std::map<int, std::list<bool> > otherData; +}; + +void foo() +{ + List<byte> bob = new List<byte>(); +} + +A<B> foo; +A<B, C> bar; +A<B *> baz; +A<B<C> > bay; + +void asd(void) +{ + A<B> foo; + A<B, C> bar; + A<B *> baz; + A<B<C> > bay; + + if (a < b && b > c) + { + a = b < c > 0; + } + if (a<bar()> c) + { + } + a < up_lim() ? do_hi() : do_low; + a[a<b> c] = d; +} + +template<typename T> class MyClass +{ +} + +template<typename T> +class MyClass +{ +} + +template<typename A, typename B, typename C> class MyClass : myvar(0), + myvar2(0) +{ +} + +template<typename A, typename B, typename C> class MyClass + : myvar(0), + myvar2(0) +{ +} + + +static int max_value() +{ + return((std::numeric_limits<int>::max)()); +} + +template<class Config_> +priority_queue<Config_>::~priority_queue () +{ +} + +template<class T> +T test(T a) +{ + return(a); +} + +int main() +{ + int k; + int j; + h g<int>; + + k = test<int> (j); + return(0); +} + +template<typename T, template<typename, unsigned int, unsigned int> class ConcreteStorageClass> +class RotationMatrix + : public StaticBaseMatrix<T, 3, 3, ConcreteStorageClass> +{ + public: + RotationMatrix() + : StaticBaseMatrix<T, 3, 3, ConcreteStorageClass>() + { + // do some initialization + } + + void assign(const OtherClass<T, 3, 3>& other) + { + // do something + } +}; + +int main() +{ + MyClass<double, 3, 3, MyStorage> foo; +} + +template<typename CharT, int N, typename Traits> +inline std::basic_ostream<CharT, Traits>& FWStreamOut(std::basic_ostream<CharT, Traits>&os, + const W::S<CharT, N, Traits>&s) +{ + return(operator<<<CharT, N, Traits, char, std::char_traits<char> > (os, s)); +} + +struct foo +{ + type1<int&> bar; +}; +struct foo +{ + type1<int const> bar; +}; + + +template<int i> void f(); +template<int i> void g() +{ + f<i - 1>(); + f<i>(); + f<i + 1>(); + f<bar()>(); +} +void h() +{ + g<42>(); +} + +#include <vector> +std::vector<int> A(2); +std::vector<int> B; +std::vector<int> C(2); +std::vector<int> D; + +template<class T> struct X +{ + template<class U> void operator()(U); +}; + +template<class T> class Y { + template<class V> void f(V); +}; + +void (*foobar)(void) = NULL; +std::vector<void (*)(void)> functions; + +#define MACRO(a) a +template<typename = int> class X; +MACRO(void f(X<>& x)); +void g(X<>& x); + +#include <vector> +typedef std::vector<std::vector<int> > Table; // OK +typedef std::vector<std::vector<bool> > Flags; // Error + +void func(List<B> =default_val1); +void func(List<List<B> > =default_val2); + +BLAH<(3.14 >= 42)> blah; +bool X = j<3> > 1; + +void foo() +{ + A<(X > Y)> a; + + a = static_cast<List<B> >(ld); +} + +template<int i> class X { /* ... */ +}; +X < 1 > 2 > x1; // Syntax error. +X<(1 > 2)> x2; // Okay. + +template<class T> class Y { /* ... */ +}; +Y<X<1> > x3; // Okay, same as "Y<X<1> > x3;". +Y<X<(6 >> 1)> > x4; + + +template<typename T> +int +myFunc1(typename T::Subtype val); + +int +myFunc2(T::Subtype val); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30024-class-init.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30024-class-init.cpp new file mode 100644 index 00000000..884d5c71 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30024-class-init.cpp @@ -0,0 +1,73 @@ + +class Foo : + public Bar +{ + +}; + +#define CTOR(i, _) : \ + T(X()), \ + y() \ +{ } + +class Foo2 : + public Bar +{ + +}; + +class GLOX_API ClientBase : + public Class, + public OtherClass, + public ThridClass, + public ForthClass +{ +public: +ClientBase(const ClientBase & f) +{ + // do something +} +}; + +ClientBase::ClientBase (const std::string& ns, + const std::string& ns1, + const std::string& ns2) +{ + +} + +Foo::Foo(int bar) : + someVar(bar), + othervar(0) +{ +} + +Foo::Foo(int bar) : + someVar(bar), + othervar(0) +{ +} + +Foo::Foo(int bar) : + someVar(bar), + othervar(0) +{ +} + +Foo::Foo(int bar) : + someVar(bar), + othervar(0) +{ +} + +Foo::Foo(int bar) : + someVar(bar), + othervar(0) +{ +} + +Foo::Foo(int bar) : + someVar(bar), + othervar(0) +{ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30025-class-init.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30025-class-init.cpp new file mode 100644 index 00000000..703686ac --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30025-class-init.cpp @@ -0,0 +1,65 @@ + +class Foo : + public Bar +{ + +}; + +#define CTOR(i, _) : \ + T(X()), \ + y() \ +{ } + +class Foo2 : + public Bar +{ + +}; + +class GLOX_API ClientBase : + public Class, + public OtherClass, + public ThridClass, + public ForthClass +{ +public: +ClientBase(const ClientBase & f) { + // do something +} +}; + +ClientBase::ClientBase (const std::string& ns, + const std::string& ns1, + const std::string& ns2) { + +} + +Foo::Foo(int bar) : + someVar(bar), + othervar(0) { +} + +Foo::Foo(int bar) : + someVar(bar), + othervar(0) { +} + +Foo::Foo(int bar) : + someVar(bar), + othervar(0) { +} + +Foo::Foo(int bar) : + someVar(bar), + othervar(0) { +} + +Foo::Foo(int bar) : + someVar(bar), + othervar(0) { +} + +Foo::Foo(int bar) : + someVar(bar), + othervar(0) { +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30026-byref.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30026-byref.cpp new file mode 100644 index 00000000..2534aa05 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30026-byref.cpp @@ -0,0 +1,46 @@ +bool foo(int &idx) +{ + if (idx < m_count) + { + idx++; + return m_bool[idx-1]; + } + return false; +} + +class Foo { +public: + Foo(); + Foo(const Foo &f); +}; + +class NS::Foo { +public: + Foo(Bar &b); +}; + +template< class T > class ListManager +{ +protected: + T head; + +public: + ListManager() + { + head.next = head.prev = &head; + } + + ListManager(const ListManager &ref) + { + head.next = head.prev = &head; + } +} + +const Foo &Foo::operator ==(Foo &me){ + ::sockaddr* ptr = (::sockaddr*)&host; + return me; +} + +MyType &MyClass::myMethode() { + const MyType &t = getSomewhere(); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30027-byref.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30027-byref.cpp new file mode 100644 index 00000000..d0598697 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30027-byref.cpp @@ -0,0 +1,46 @@ +bool foo(int& idx) +{ + if (idx < m_count) + { + idx++; + return m_bool[idx-1]; + } + return false; +} + +class Foo { +public: + Foo(); + Foo(const Foo& f); +}; + +class NS::Foo { +public: + Foo(Bar& b); +}; + +template< class T > class ListManager +{ +protected: + T head; + +public: + ListManager() + { + head.next = head.prev = &head; + } + + ListManager(const ListManager& ref) + { + head.next = head.prev = &head; + } +} + +const Foo& Foo::operator ==(Foo& me){ + ::sockaddr* ptr = (::sockaddr*)&host; + return me; +} + +MyType& MyClass::myMethode() { + const MyType& t = getSomewhere(); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30028-byref.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30028-byref.cpp new file mode 100644 index 00000000..7a97856d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30028-byref.cpp @@ -0,0 +1,46 @@ +bool foo(int & idx) +{ + if (idx < m_count) + { + idx++; + return m_bool[idx-1]; + } + return false; +} + +class Foo { +public: + Foo(); + Foo(const Foo & f); +}; + +class NS::Foo { +public: + Foo(Bar & b); +}; + +template< class T > class ListManager +{ +protected: + T head; + +public: + ListManager() + { + head.next = head.prev = &head; + } + + ListManager(const ListManager & ref) + { + head.next = head.prev = &head; + } +} + +const Foo & Foo::operator ==(Foo & me){ + ::sockaddr* ptr = (::sockaddr*)&host; + return me; +} + +MyType & MyClass::myMethode() { + const MyType & t = getSomewhere(); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30029-init_align.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30029-init_align.h new file mode 100644 index 00000000..085f838b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30029-init_align.h @@ -0,0 +1,22 @@ +struct file_lang languages[] = +{ + { ".c", "C", LANG_C }, + { ".cpp", "CPP", LANG_CPP }, + { ".d", "D", LANG_D }, + { ".cs", "CS", LANG_CS }, + { ".vala", "VALA", LANG_VALA }, + { ".java", "JAVA", LANG_JAVA }, + { ".pawn", "PAWN", LANG_PAWN }, + { ".p", "", LANG_PAWN }, + { ".sma", "", LANG_PAWN }, + { ".inl", "", LANG_PAWN }, + { ".h", "", LANG_CPP }, + { ".cxx", "", LANG_CPP }, + { ".hpp", "", LANG_CPP }, + { ".hxx", "", LANG_CPP }, + { ".cc", "", LANG_CPP }, + { ".di", "", LANG_D }, + { ".m", "OC", LANG_OC }, + { ".sqc", "", LANG_C }, // embedded SQL +}; + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30030-Timestamp.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30030-Timestamp.h new file mode 100644 index 00000000..998b7d6f --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30030-Timestamp.h @@ -0,0 +1,166 @@ +/**
+ * @file Timestamp.h
+ * Definition of class example::Timestamp.
+ */
+
+#ifndef __Timestamp_h_
+#define __Timestamp_h_
+
+#include <string>
+
+namespace example {
+class IStreamable;
+class InStream;
+class OutStream;
+
+/**
+ * Timestamp is a timestamp with nanosecond resolution.
+ */
+class Timestamp
+ : public IStreamable
+{
+public:
+
+/**
+ * Default constructor.
+ */
+Timestamp();
+
+/**
+ * Constructor.
+ *
+ * @param sec The seconds
+ * @param nsec The nanoseconds
+ */
+Timestamp(long sec, unsigned long nsec);
+
+/**
+ * Destructor.
+ */
+virtual ~Timestamp();
+
+/**
+ * Adds two timestamps.
+ *
+ * @param rhs The other timestamp
+ * @return The resulting timestamp
+ */
+Timestamp operator+(const Timestamp& rhs) const;
+
+/**
+ * Substracts two timestamps.
+ *
+ * @param rhs The other timestamp
+ * @return The resulting timestamp
+ */
+Timestamp operator-(const Timestamp& rhs) const;
+
+/**
+ * Compares two timestamps.
+ *
+ * @param rhs The other timestamp
+ * @return true if timestamp is smaller than the given timestamp
+ */
+bool operator<(const Timestamp& rhs) const;
+
+/**
+ * Compares two timestamps.
+ *
+ * @param rhs The other timestamp
+ * @return true if timestamp is greater than the given timestamp
+ */
+bool operator>(const Timestamp& rhs) const;
+
+/**
+ * Compares two timestamps.
+ *
+ * @param rhs The other timestamp
+ * @return true if timestamp is equal to the given timestamp
+ */
+bool operator==(const Timestamp& rhs) const;
+
+/**
+ * Compares two timestamps.
+ *
+ * @param rhs The other timestamp
+ * @return true if timestamp is not equal to the given timestamp
+ */
+bool operator!=(const Timestamp& rhs) const;
+
+/**
+ * Adds an other timestamp.
+ *
+ * @param rhs The other timestamp
+ */
+void operator+=(const Timestamp& rhs);
+
+/**
+ * Adds milliseconds.
+ *
+ * @param ms The milliseconds
+ * @return The resulting timestamp
+ */
+Timestamp addMilliseconds(unsigned long ms) const;
+
+/**
+ * Adds nanoseconds.
+ *
+ * @param ns The nanoseconds
+ * @return The resulting timestamp
+ */
+Timestamp addNanoseconds(unsigned long ns) const;
+
+/**
+ * Checks if this timestamp is zero.
+ *
+ * @return true if timestamp is zero
+ */
+bool isZero() const;
+
+/**
+ * Gets the milliseconds.
+ * @attention Negativ timestamp return zero
+ *
+ * @return The milliseconds
+ */
+unsigned long getMilliseconds() const;
+
+/**
+ * Divide timestamps by two.
+ *
+ * @return The resulting timestamp
+ */
+Timestamp divideByTwo();
+
+/**
+ * Gets the string-representation.
+ *
+ * @return The string representation
+ */
+std::string getString() const;
+
+/**
+ * Gets the string-representation in milliseconds.
+ *
+ * @return The string representation
+ */
+std::string getStringMilliseconds() const;
+
+/**
+ * Resets the timestamp.
+ */
+void reset();
+
+/** The seconds */
+long sec;
+
+/** The nanoseconds */
+unsigned long nsec;
+
+InStream& operator <<(InStream& in);
+
+OutStream& operator >>(OutStream& out) const;
+};
+} // namespace
+
+#endif // __Timestamp_h_
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30031-operator.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30031-operator.cpp new file mode 100644 index 00000000..f17b865d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30031-operator.cpp @@ -0,0 +1,90 @@ +struct bar; +struct foo { + operator bar*(); + auto operator <=>(const foo& rhs) const = default; +}; + +class Foo { +Foo operator+(const Foo& rhs) const; + +const Foo& operator ==(Foo& me); + +bool operator>(const Foo& rhs) const; + +InStream& operator <<(InStream& in); +} + +const Foo& Foo::operator ==(Foo& me) +{ +} + +Foo Foo::operator+(const Foo& rhs) const +{ +} + +bool Foo::operator>(const Foo& rhs) const +{ +} + +class Example +{ +char m_array [256]; + +Example& operator=(const Example&rhs); +Example& operator+=(const Example&rhs); +const Example operator+(const Example&other) const; +bool operator==(const Example&other) const; +bool operator!=(const Example&other) const; +Example operator+(const Example& x, const Example& y); +Example operator*(const Example& x, const Example& y); + +double& operator()(int row, int col); +double operator()(int row, int col) const; +void operator++(); +int& operator*(); +Example& operator++(); // prefix ++ +Example operator++(int); // postfix ++ + +bool operator <(const Example& lhs, const Example& rhs) const; + +int operator()(int index) +{ + i = ~~3; + return index + 1; +} + +char& operator[](unsigned i) +{ + return m_array [i & 0xff]; +} +} +bool Example::operator==(const Example&other) const +{ + /*TODO: compare something? */ + return false; +} + +bool Example::operator!=(const Example&other) const +{ + return !operator ==(other); +} + +void a() +{ + Op op = &X::operator==; + if (!A) { + if (op != &X::operator==) { + A(1) = a; + } + } + if (!A) { + if (op != &X::operator==) { + A(1) = a; + } + } +} + +void *operator new(std::size_t) throw(std::bad_alloc); +void *operator new[](std::size_t) throw(std::bad_alloc); +void operator delete(void *) throw(); +void operator delete[](void *) throw(); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30032-operator.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30032-operator.cpp new file mode 100644 index 00000000..cfa98ca1 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30032-operator.cpp @@ -0,0 +1,88 @@ + +struct bar; +struct foo +{ + operator bar* (); + auto operator <=> (const foo& rhs) const = default; +}; + +class Foo { + Foo operator + (const Foo& rhs) const; + + const Foo& operator == (Foo& me); + + bool operator > (const Foo& rhs) const; + + InStream& operator << (InStream& in); +} + +const Foo& Foo::operator == (Foo& me) +{ +} + +Foo Foo::operator + (const Foo& rhs) const +{ +} + +bool Foo::operator > (const Foo& rhs) const +{ +} + +class Example +{ + char m_array[256]; + + Example& operator = (const Example& rhs); + Example& operator += (const Example& rhs); + const Example operator + (const Example& other) const; + bool operator == (const Example& other) const; + bool operator != (const Example& other) const; + Example operator + (const Example& x, const Example& y); + Example operator * (const Example& x, const Example& y); + + double& operator () (int row, int col); + double operator () (int row, int col) const; + void operator ++ (); + int& operator * (); + Example& operator ++ (); // prefix ++ + Example operator ++ (int); // postfix ++ + + bool operator < (const Example& lhs, const Example& rhs) const; + + int operator () (int index) + { + i = ~~3; + return index + 1; + } + + char& operator [] (unsigned i) + { + return m_array[i & 0xff]; + } +} +bool Example::operator == (const Example& other) const +{ + /*TODO: compare something? */ + return false; +} +bool Example::operator != (const Example& other) const +{ + return !operator == (other); +} + + +void a() { + Op op = &X::operator ==; + if (!A) + if (op != &X::operator ==) + A(1) = a; + if (!A) { + if (op != &X::operator ==) + A(1) = a; + } +} + +void *operator new (std::size_t) throw(std::bad_alloc); +void *operator new[] (std::size_t) throw(std::bad_alloc); +void operator delete (void *) throw(); +void operator delete[] (void *) throw(); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30033-operator.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30033-operator.cpp new file mode 100644 index 00000000..976d919f --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30033-operator.cpp @@ -0,0 +1,88 @@ + +struct bar; +struct foo +{ + operator bar*(); + auto operator<=>(const foo& rhs) const = default; +}; + +class Foo { + Foo operator+(const Foo& rhs) const; + + const Foo& operator==(Foo& me); + + bool operator>(const Foo& rhs) const; + + InStream& operator<<(InStream& in); +} + +const Foo& Foo::operator==(Foo& me) +{ +} + +Foo Foo::operator+(const Foo& rhs) const +{ +} + +bool Foo::operator>(const Foo& rhs) const +{ +} + +class Example +{ + char m_array[256]; + + Example& operator=(const Example& rhs); + Example& operator+=(const Example& rhs); + const Example operator+(const Example& other) const; + bool operator==(const Example& other) const; + bool operator!=(const Example& other) const; + Example operator+(const Example& x, const Example& y); + Example operator*(const Example& x, const Example& y); + + double& operator()(int row, int col); + double operator()(int row, int col) const; + void operator++(); + int& operator*(); + Example& operator++(); // prefix ++ + Example operator++(int); // postfix ++ + + bool operator<(const Example& lhs, const Example& rhs) const; + + int operator()(int index) + { + i = ~~3; + return index + 1; + } + + char& operator[](unsigned i) + { + return m_array[i & 0xff]; + } +} +bool Example::operator==(const Example& other) const +{ + /*TODO: compare something? */ + return false; +} +bool Example::operator!=(const Example& other) const +{ + return !operator==(other); +} + + +void a() { + Op op = &X::operator==; + if (!A) + if (op != &X::operator==) + A(1) = a; + if (!A) { + if (op != &X::operator==) + A(1) = a; + } +} + +void *operator new(std::size_t) throw(std::bad_alloc); +void *operator new[](std::size_t) throw(std::bad_alloc); +void operator delete(void *) throw(); +void operator delete[](void *) throw(); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30034-operator_proto.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30034-operator_proto.cpp new file mode 100644 index 00000000..3e5af195 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30034-operator_proto.cpp @@ -0,0 +1,65 @@ +/* A collection of all the different known operator prototypes in C++ */ + +// arithmetic operators +Type1 operator + (const Type1& a); // +a +Type1 operator + (const Type1& a, const Type2& b); // a + b +Type1& operator ++ (Type1& a); // ++a +Type1 operator ++ (Type1& a, int); // a++ +Type1& operator += (Type1& a, const Type1& b); // a += b +Type1 operator - (const Type1& a); // -a +Type1& operator -- (Type1& a); // --a +Type1 operator -- (Type1& a, int); // a-- +Type1& operator -= (Type1& a, const Type1& b); // a -= b +Type1 operator * (const Type1& a, const Type1& b); // a * b +Type1& operator *= (Type1& a, const Type1& b); // a *= b +Type1 operator / (const Type1& a, const Type1& b); // a / b +Type1& operator /= (Type1& a, const Type1& b); // a /= b +Type1 operator % (const Type1& a, const Type1& b); // a % b +Type1& operator %= (Type1& a, const Type1& b); // a %= b + +// comparison operators +bool operator < (const Type1& a, const Type1& b); // a < b +bool operator <= (const Type1& a, const Type1& b); // a <= b +bool operator > (const Type1& a, const Type1& b); // a > b +bool operator >= (const Type1& a, const Type1& b); // a >= b +bool operator != (const Type1& a, const Type1& b); // a != b +bool operator == (const Type1& a, const Type1& b); // a == b +bool operator <=> (const Type1& a, const Type1& b); // a <=> b + +// logical operators +bool operator ! (const Type1& a); // !a +bool operator && (const Type1& a, const Type1& b); // a && b +bool operator || (const Type1& a, const Type1& b); // a || b + +// bitwise operators +Type1 operator << (const Type1& a, const Type1& b); // a << b +Type1& operator <<= (Type1& a, const Type1& b); // a <<= b +Type1 operator >> (const Type1& a, const Type1& b); // a >> b +Type1& operator >>= (Type1& a, const Type1& b); // a >>= b +Type1 operator ~ (const Type1& a); // ~a +Type1 operator & (const Type1& a, const Type1& b); // a & b +Type1& operator &= (Type1& a, const Type1& b); // a &= b +Type1 operator | (const Type1& a, const Type1& b); // a | b +Type1& operator |= (Type1& a, const Type1& b); // a |= b +Type1 operator ^ (const Type1& a, const Type1& b); // a ^ b +Type1& operator ^= (Type1& a, const Type1& b); // a ^= b + +// other operators +Type1& Type1::operator = (const Type1& b); // a = b +void operator () (Type1& a); // a() +const Type2& operator [] (const Type1& a, const Type1& b); // a[b] +Type2& operator * (const Type1& a); // *a +Type2* operator & (const Type1& a); // &a +Type2* Type1::operator -> (); // a->b +Type1::operator type (); // (type)a +Type2& operator , (const Type1& a, Type2& b); // a, b +void *Type1::operator new (size_t x); // new Type1 +void *Type1::operator new[] (size_t x); // new Type1[n] +void *Type1::operator delete (size_t x); // delete a +void *Type1::operator delete[] (size_t x); // delete [] a + +// Misc examples +int& operator * (); +Foo::operator const char * (); +Foo::operator const Bar& (); + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30035-operator_proto.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30035-operator_proto.cpp new file mode 100644 index 00000000..3824798c --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30035-operator_proto.cpp @@ -0,0 +1,65 @@ +/* A collection of all the different known operator prototypes in C++ */ + +// arithmetic operators +Type1 operator+(const Type1& a); // +a +Type1 operator+(const Type1& a, const Type2& b); // a + b +Type1& operator++(Type1& a); // ++a +Type1 operator++(Type1& a, int); // a++ +Type1& operator+=(Type1& a, const Type1& b); // a += b +Type1 operator-(const Type1& a); // -a +Type1& operator--(Type1& a); // --a +Type1 operator--(Type1& a, int); // a-- +Type1& operator-=(Type1& a, const Type1& b); // a -= b +Type1 operator*(const Type1& a, const Type1& b); // a * b +Type1& operator*=(Type1& a, const Type1& b); // a *= b +Type1 operator/(const Type1& a, const Type1& b); // a / b +Type1& operator/=(Type1& a, const Type1& b); // a /= b +Type1 operator%(const Type1& a, const Type1& b); // a % b +Type1& operator%=(Type1& a, const Type1& b); // a %= b + +// comparison operators +bool operator<(const Type1& a, const Type1& b); // a < b +bool operator<=(const Type1& a, const Type1& b); // a <= b +bool operator>(const Type1& a, const Type1& b); // a > b +bool operator>=(const Type1& a, const Type1& b); // a >= b +bool operator!=(const Type1& a, const Type1& b); // a != b +bool operator==(const Type1& a, const Type1& b); // a == b +bool operator<=>(const Type1& a, const Type1& b); // a <=> b + +// logical operators +bool operator!(const Type1& a); // !a +bool operator&&(const Type1& a, const Type1& b); // a && b +bool operator||(const Type1& a, const Type1& b); // a || b + +// bitwise operators +Type1 operator<<(const Type1& a, const Type1& b); // a << b +Type1& operator<<=(Type1& a, const Type1& b); // a <<= b +Type1 operator>>(const Type1& a, const Type1& b); // a >> b +Type1& operator>>=(Type1& a, const Type1& b); // a >>= b +Type1 operator~(const Type1& a); // ~a +Type1 operator&(const Type1& a, const Type1& b); // a & b +Type1& operator&=(Type1& a, const Type1& b); // a &= b +Type1 operator|(const Type1& a, const Type1& b); // a | b +Type1& operator|=(Type1& a, const Type1& b); // a |= b +Type1 operator^(const Type1& a, const Type1& b); // a ^ b +Type1& operator^=(Type1& a, const Type1& b); // a ^= b + +// other operators +Type1& Type1::operator=(const Type1& b); // a = b +void operator()(Type1& a); // a() +const Type2& operator[](const Type1& a, const Type1& b); // a[b] +Type2& operator*(const Type1& a); // *a +Type2* operator&(const Type1& a); // &a +Type2* Type1::operator->(); // a->b +Type1::operator type(); // (type)a +Type2& operator,(const Type1& a, Type2& b); // a, b +void *Type1::operator new(size_t x); // new Type1 +void *Type1::operator new[](size_t x); // new Type1[n] +void *Type1::operator delete(size_t x); // delete a +void *Type1::operator delete[](size_t x); // delete [] a + +// Misc examples +int& operator*(); +Foo::operator const char *(); +Foo::operator const Bar&(); + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30036-operator.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30036-operator.cpp new file mode 100644 index 00000000..b1468795 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30036-operator.cpp @@ -0,0 +1,88 @@ + +struct bar; +struct foo +{ + operator bar*(); + auto operator<=>(const foo& rhs) const = default; +}; + +class Foo { + Foo operator +(const Foo& rhs) const; + + const Foo& operator==(Foo& me); + + bool operator >(const Foo& rhs) const; + + InStream& operator <<(InStream& in); +} + +const Foo& Foo::operator==(Foo& me) +{ +} + +Foo Foo::operator+(const Foo& rhs) const +{ +} + +bool Foo::operator>(const Foo& rhs) const +{ +} + +class Example +{ + char m_array[256]; + + Example& operator =(const Example& rhs); + Example& operator +=(const Example& rhs); + const Example operator+(const Example& other) const; + bool operator ==(const Example& other) const; + bool operator !=(const Example& other) const; + Example operator +(const Example& x, const Example& y); + Example operator *(const Example& x, const Example& y); + + double& operator ()(int row, int col); + double operator ()(int row, int col) const; + void operator ++(); + int& operator *(); + Example& operator ++(); // prefix ++ + Example operator ++(int); // postfix ++ + + bool operator <(const Example& lhs, const Example& rhs) const; + + int operator()(int index) + { + i = ~~3; + return index + 1; + } + + char& operator[](unsigned i) + { + return m_array[i & 0xff]; + } +} +bool Example::operator==(const Example& other) const +{ + /*TODO: compare something? */ + return false; +} +bool Example::operator!=(const Example& other) const +{ + return !operator==(other); +} + + +void a() { + Op op = &X::operator==; + if (!A) + if (op != &X::operator==) + A(1) = a; + if (!A) { + if (op != &X::operator==) + A(1) = a; + } +} + +void *operator new(std::size_t) throw(std::bad_alloc); +void *operator new[](std::size_t) throw(std::bad_alloc); +void operator delete(void *) throw(); +void operator delete[](void *) throw(); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30037-operator_proto.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30037-operator_proto.cpp new file mode 100644 index 00000000..d5c7e8fc --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30037-operator_proto.cpp @@ -0,0 +1,65 @@ +/* A collection of all the different known operator prototypes in C++ */ + +// arithmetic operators +Type1 operator +(const Type1& a); // +a +Type1 operator +(const Type1& a, const Type2& b); // a + b +Type1& operator++(Type1& a); // ++a +Type1 operator ++(Type1& a, int); // a++ +Type1& operator+=(Type1& a, const Type1& b); // a += b +Type1 operator -(const Type1& a); // -a +Type1& operator--(Type1& a); // --a +Type1 operator --(Type1& a, int); // a-- +Type1& operator-=(Type1& a, const Type1& b); // a -= b +Type1 operator *(const Type1& a, const Type1& b); // a * b +Type1& operator*=(Type1& a, const Type1& b); // a *= b +Type1 operator /(const Type1& a, const Type1& b); // a / b +Type1& operator/=(Type1& a, const Type1& b); // a /= b +Type1 operator %(const Type1& a, const Type1& b); // a % b +Type1& operator%=(Type1& a, const Type1& b); // a %= b + +// comparison operators +bool operator<(const Type1& a, const Type1& b); // a < b +bool operator<=(const Type1& a, const Type1& b); // a <= b +bool operator>(const Type1& a, const Type1& b); // a > b +bool operator>=(const Type1& a, const Type1& b); // a >= b +bool operator!=(const Type1& a, const Type1& b); // a != b +bool operator==(const Type1& a, const Type1& b); // a == b +bool operator<=>(const Type1& a, const Type1& b); // a <=> b + +// logical operators +bool operator!(const Type1& a); // !a +bool operator&&(const Type1& a, const Type1& b); // a && b +bool operator||(const Type1& a, const Type1& b); // a || b + +// bitwise operators +Type1 operator <<(const Type1& a, const Type1& b); // a << b +Type1& operator<<=(Type1& a, const Type1& b); // a <<= b +Type1 operator >>(const Type1& a, const Type1& b); // a >> b +Type1& operator>>=(Type1& a, const Type1& b); // a >>= b +Type1 operator ~(const Type1& a); // ~a +Type1 operator &(const Type1& a, const Type1& b); // a & b +Type1& operator&=(Type1& a, const Type1& b); // a &= b +Type1 operator |(const Type1& a, const Type1& b); // a | b +Type1& operator|=(Type1& a, const Type1& b); // a |= b +Type1 operator ^(const Type1& a, const Type1& b); // a ^ b +Type1& operator^=(Type1& a, const Type1& b); // a ^= b + +// other operators +Type1& Type1::operator=(const Type1& b); // a = b +void operator ()(Type1& a); // a() +const Type2& operator [](const Type1& a, const Type1& b); // a[b] +Type2& operator *(const Type1& a); // *a +Type2* operator &(const Type1& a); // &a +Type2* Type1::operator->(); // a->b +Type1::operator type(); // (type)a +Type2& operator ,(const Type1& a, Type2& b); // a, b +void *Type1::operator new(size_t x); // new Type1 +void *Type1::operator new[](size_t x); // new Type1[n] +void *Type1::operator delete(size_t x); // delete a +void *Type1::operator delete[](size_t x); // delete [] a + +// Misc examples +int& operator *(); +Foo::operator const char *(); +Foo::operator const Bar&(); + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30038-operator.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30038-operator.cpp new file mode 100644 index 00000000..a1bfafe3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30038-operator.cpp @@ -0,0 +1,88 @@ + +struct bar; +struct foo +{ + operator bar*(); + auto operator<=>(const foo& rhs) const = default; +}; + +class Foo { + Foo operator+(const Foo& rhs) const; + + const Foo& operator==(Foo& me); + + bool operator>(const Foo& rhs) const; + + InStream& operator<<(InStream& in); +} + +const Foo& Foo::operator==(Foo& me) +{ +} + +Foo Foo::operator+(const Foo& rhs) const +{ +} + +bool Foo::operator>(const Foo& rhs) const +{ +} + +class Example +{ + char m_array[256]; + + Example& operator=(const Example& rhs); + Example& operator+=(const Example& rhs); + const Example operator+(const Example& other) const; + bool operator==(const Example& other) const; + bool operator!=(const Example& other) const; + Example operator+(const Example& x, const Example& y); + Example operator*(const Example& x, const Example& y); + + double& operator()(int row, int col); + double operator()(int row, int col) const; + void operator++(); + int& operator*(); + Example& operator++(); // prefix ++ + Example operator++(int); // postfix ++ + + bool operator<(const Example& lhs, const Example& rhs) const; + + int operator()(int index) + { + i = ~~3; + return index + 1; + } + + char& operator[](unsigned i) + { + return m_array[i & 0xff]; + } +} +bool Example::operator==(const Example& other) const +{ + /*TODO: compare something? */ + return false; +} +bool Example::operator!=(const Example& other) const +{ + return !operator==(other); +} + + +void a() { + Op op = &X::operator==; + if (!A) + if (op != &X::operator==) + A(1) = a; + if (!A) { + if (op != &X::operator==) + A(1) = a; + } +} + +void *operator new(std::size_t) throw(std::bad_alloc); +void *operator new[](std::size_t) throw(std::bad_alloc); +void operator delete(void *) throw(); +void operator delete[](void *) throw(); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30039-operator_proto.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30039-operator_proto.cpp new file mode 100644 index 00000000..4ec0acf1 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30039-operator_proto.cpp @@ -0,0 +1,65 @@ +/* A collection of all the different known operator prototypes in C++ */ + +// arithmetic operators +Type1 operator+(const Type1& a); // +a +Type1 operator+(const Type1& a, const Type2& b); // a + b +Type1& operator++(Type1& a); // ++a +Type1 operator++(Type1& a, int); // a++ +Type1& operator+=(Type1& a, const Type1& b); // a += b +Type1 operator-(const Type1& a); // -a +Type1& operator--(Type1& a); // --a +Type1 operator--(Type1& a, int); // a-- +Type1& operator-=(Type1& a, const Type1& b); // a -= b +Type1 operator*(const Type1& a, const Type1& b); // a * b +Type1& operator*=(Type1& a, const Type1& b); // a *= b +Type1 operator/(const Type1& a, const Type1& b); // a / b +Type1& operator/=(Type1& a, const Type1& b); // a /= b +Type1 operator%(const Type1& a, const Type1& b); // a % b +Type1& operator%=(Type1& a, const Type1& b); // a %= b + +// comparison operators +bool operator<(const Type1& a, const Type1& b); // a < b +bool operator<=(const Type1& a, const Type1& b); // a <= b +bool operator>(const Type1& a, const Type1& b); // a > b +bool operator>=(const Type1& a, const Type1& b); // a >= b +bool operator!=(const Type1& a, const Type1& b); // a != b +bool operator==(const Type1& a, const Type1& b); // a == b +bool operator<=>(const Type1& a, const Type1& b); // a <=> b + +// logical operators +bool operator!(const Type1& a); // !a +bool operator&&(const Type1& a, const Type1& b); // a && b +bool operator||(const Type1& a, const Type1& b); // a || b + +// bitwise operators +Type1 operator<<(const Type1& a, const Type1& b); // a << b +Type1& operator<<=(Type1& a, const Type1& b); // a <<= b +Type1 operator>>(const Type1& a, const Type1& b); // a >> b +Type1& operator>>=(Type1& a, const Type1& b); // a >>= b +Type1 operator~(const Type1& a); // ~a +Type1 operator&(const Type1& a, const Type1& b); // a & b +Type1& operator&=(Type1& a, const Type1& b); // a &= b +Type1 operator|(const Type1& a, const Type1& b); // a | b +Type1& operator|=(Type1& a, const Type1& b); // a |= b +Type1 operator^(const Type1& a, const Type1& b); // a ^ b +Type1& operator^=(Type1& a, const Type1& b); // a ^= b + +// other operators +Type1& Type1::operator=(const Type1& b); // a = b +void operator()(Type1& a); // a() +const Type2& operator[](const Type1& a, const Type1& b); // a[b] +Type2& operator*(const Type1& a); // *a +Type2* operator&(const Type1& a); // &a +Type2* Type1::operator->(); // a->b + Type1::operator type(); // (type)a +Type2& operator,(const Type1& a, Type2& b); // a, b +void * Type1::operator new(size_t x); // new Type1 +void * Type1::operator new[](size_t x); // new Type1[n] +void * Type1::operator delete(size_t x); // delete a +void * Type1::operator delete[](size_t x); // delete [] a + +// Misc examples +int& operator*(); + Foo::operator const char *(); + Foo::operator const Bar&(); + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30040-nl-class.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30040-nl-class.h new file mode 100644 index 00000000..9ccbcf75 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30040-nl-class.h @@ -0,0 +1,57 @@ +#ifndef NL_CLASS_H_INCLUDED +#define NL_CLASS_H_INCLUDED + +#include <string> + +namespace example { + + class IStreamable; + class InStream; + class OutStream; + +/** + * Timestamp is a timestamp with nanosecond resolution. + */ + class Inher + : public IStreamable { + +public: + Inher(); + virtual ~Inher(); + + }; + +/** + * Timestamp is a timestamp with nanosecond resolution. + */ + class Inher2 + : public IStreamable { + +public: + + Inher2(); + Inher2(long sec, unsigned long nsec); + + }; + + class Simple { + +public: + + Simple(); + virtual ~Simple(); + + }; + + class Simple2 { + +public: + + Simple2(); + virtual ~Simple2(); + + }; + +} // namespace + +#endif // NL_CLASS_H_INCLUDED diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30041-nl-class.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30041-nl-class.h new file mode 100644 index 00000000..57e47625 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30041-nl-class.h @@ -0,0 +1,61 @@ +#ifndef NL_CLASS_H_INCLUDED +#define NL_CLASS_H_INCLUDED + +#include <string> + +namespace example { + + class IStreamable; + class InStream; + class OutStream; + +/** + * Timestamp is a timestamp with nanosecond resolution. + */ + class Inher + : public IStreamable + { + +public: + Inher(); + virtual ~Inher(); + + }; + +/** + * Timestamp is a timestamp with nanosecond resolution. + */ + class Inher2 + : public IStreamable + { + +public: + + Inher2(); + Inher2(long sec, unsigned long nsec); + + }; + + class Simple + { + +public: + + Simple(); + virtual ~Simple(); + + }; + + class Simple2 + { + +public: + + Simple2(); + virtual ~Simple2(); + + }; + +} // namespace + +#endif // NL_CLASS_H_INCLUDED diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30042-Issue_2020.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30042-Issue_2020.cpp new file mode 100644 index 00000000..d618f922 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30042-Issue_2020.cpp @@ -0,0 +1,17 @@ +class X21 +{ +public: +void f(int p1, int p2); +}; + +void +X21::f(int p1, int p2) +{ +} + +void +n1() +{ + X21 x21; + x21.f(111, 122); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30043-nl_func_call_empty.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30043-nl_func_call_empty.cpp new file mode 100644 index 00000000..fbf89d16 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30043-nl_func_call_empty.cpp @@ -0,0 +1,2 @@ +SomeFunction
+ ();
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30044-nl_func_call_paren_empty.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30044-nl_func_call_paren_empty.cpp new file mode 100644 index 00000000..4495d667 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30044-nl_func_call_paren_empty.cpp @@ -0,0 +1,2 @@ +SomeFunction(
+ );
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30045-nl_func_decl.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30045-nl_func_decl.cpp new file mode 100644 index 00000000..81d0a00e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30045-nl_func_decl.cpp @@ -0,0 +1,29 @@ + +void bla ( ); +void ble( int a, char b ); +void ble2 ( int a, char b ); + + +void bla +( +) +{} + +void bla2 +( +) +{} + +void ble +( + int a, + char b +) +{} + +void ble2 +( + int a, + char b +) +{} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30046-nl_func_decl.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30046-nl_func_decl.cpp new file mode 100644 index 00000000..17aa59f0 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30046-nl_func_decl.cpp @@ -0,0 +1,40 @@ + +void bla +( +); +void ble +( + int a, + char b +); +void ble2 +( + int a, + char b +); + + +void bla() +{ + + +} + +void bla2() +{ + + +} + +void ble( int a, char b ) +{ + + +} + +void ble2( int a, + char b ) +{ + + +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30047-nl_func_paren_empty.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30047-nl_func_paren_empty.cpp new file mode 100644 index 00000000..e8a947c9 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30047-nl_func_paren_empty.cpp @@ -0,0 +1,7 @@ +int Function(
+ );
+
+int Function(
+ );
+
+int Function();
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30048-nl_func_def_paren_empty.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30048-nl_func_def_paren_empty.cpp new file mode 100644 index 00000000..22f3c700 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30048-nl_func_def_paren_empty.cpp @@ -0,0 +1,19 @@ +void LocalClass::LocalClass()
+{
+ int Function(
+ )
+ {
+ return 0;
+ }
+
+ int Function(
+ )
+ {
+ return 0;
+ }
+
+ int Function()
+ {
+ return 0;
+ }
+}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30049-nl_func_call_paren.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30049-nl_func_call_paren.cpp new file mode 100644 index 00000000..847b7037 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30049-nl_func_call_paren.cpp @@ -0,0 +1,5 @@ +SomeFunction
+(
+ someVar,
+ someOtherVar,
+);
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30050-nl-namespace.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30050-nl-namespace.h new file mode 100644 index 00000000..e515b479 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30050-nl-namespace.h @@ -0,0 +1,14 @@ +namespace ns1 { + + void *foo(void); + void bar(void); + +} + +namespace ns2 { + + void *foo(void); + void bar(void); + +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30051-nl-namespace.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30051-nl-namespace.h new file mode 100644 index 00000000..c51d75be --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30051-nl-namespace.h @@ -0,0 +1,16 @@ +namespace ns1 +{ + + void *foo(void); + void bar(void); + +} + +namespace ns2 +{ + + void *foo(void); + void bar(void); + +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30052-try-catch-nl.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30052-try-catch-nl.cpp new file mode 100644 index 00000000..410a735e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30052-try-catch-nl.cpp @@ -0,0 +1,24 @@ +int foo() +{ + try + { + foo(bar); + } + catch (int *e) + { + return 0; + } + + if (false) + try + { + throw int(); + } + catch(...) + { + } + + if (a) { return 1; } else { return 0; } + return 1; +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30053-exception.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30053-exception.cpp new file mode 100644 index 00000000..2c41efbf --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30053-exception.cpp @@ -0,0 +1,33 @@ + #include <iostream> + + +void foo() +{ + char *buf; + try { + buf = new unsigned char[1024]; + if( buf == 0 ) + throw "Out of memory"; + } + catch( char * str ) { + cout << "Exception: " << str << '\n'; + } +} + +void bar() +{ + char *buf; + + try + { + buf = new unsigned char[1024]; + if( buf == 0 ) + throw "Out of memory"; + } + catch( char * str ) + { + cout << "Exception: " << str << '\n'; + } +} + + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30054-Issue_2091.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30054-Issue_2091.cpp new file mode 100644 index 00000000..6e32d683 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30054-Issue_2091.cpp @@ -0,0 +1,5 @@ +#include <AClass.h> +#include <SomeClass.h> +#include <TheClass.h> +#include <iostream> +#include <vector> diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30055-nl_func.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30055-nl_func.cpp new file mode 100644 index 00000000..142e6895 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30055-nl_func.cpp @@ -0,0 +1,38 @@ +class BSRRE1D_file : PhysicalFile +{ + int getFoo() { + return(m_foo); + } + + + + void setFoo(int foo) { + m_foo = foo; + } + + + + public BSRRE1D_file() { + this.addFormatName("BSRRE1DF"); + } + + + + private int m_foo; + public void xxx() { + ahoj(); + } // comment + + + + public void yyy() { + ahoj(); + } + + + + /* comment 2 */ + public void xxx() { + ahoj(); + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30056-nl_func.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30056-nl_func.cpp new file mode 100644 index 00000000..f930b703 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30056-nl_func.cpp @@ -0,0 +1,30 @@ +class BSRRE1D_file : PhysicalFile +{ + int getFoo() { return(m_foo); } + + void setFoo(int foo) { m_foo = foo; } + + public BSRRE1D_file() { + this.addFormatName("BSRRE1DF"); + } + + + + private int m_foo; + public void xxx() { + ahoj(); + } // comment + + + + public void yyy() { + ahoj(); + } + + + + /* comment 2 */ + public void xxx() { + ahoj(); + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30057-nl_inside_namespace.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30057-nl_inside_namespace.cpp new file mode 100644 index 00000000..01486ebe --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30057-nl_inside_namespace.cpp @@ -0,0 +1,29 @@ +namespace cats +{ // rule + +int count; +void meow(); + +} + +namespace dogs { // drool + +int count; +void bark(); + +} + +namespace pigs { + +int count; +void oink(); + +} + +namespace owls +{ + +int count; +void hoot(); + +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30058-nl_inside_namespace.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30058-nl_inside_namespace.cpp new file mode 100644 index 00000000..01486ebe --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30058-nl_inside_namespace.cpp @@ -0,0 +1,29 @@ +namespace cats +{ // rule + +int count; +void meow(); + +} + +namespace dogs { // drool + +int count; +void bark(); + +} + +namespace pigs { + +int count; +void oink(); + +} + +namespace owls +{ + +int count; +void hoot(); + +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30059-Issue_2186.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30059-Issue_2186.cpp new file mode 100644 index 00000000..2c3081ea --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30059-Issue_2186.cpp @@ -0,0 +1,15 @@ +using namespace std; + +namespace ui { class CClass; } // Expected to stay as-is +namespace ui::dlg { class CClassDlg; } // Expected to stay as-is (new in C++17) + +namespace ui // Brace should be on the next line +{ + class CClass1; // Should be indented + class CClass2; + class CClass3; + class CClass4; + class CClass5; + class CClass6; + class CClass7; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30060-Issue_1734.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30060-Issue_1734.cpp new file mode 100644 index 00000000..31d08c29 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30060-Issue_1734.cpp @@ -0,0 +1,14 @@ +class X16 +{ +public: +X16(); +}; + +// https://en.cppreference.com/w/cpp/language/function-try-block +X16::X16() +try +{ +} +catch (...) +{ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30061-class-init.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30061-class-init.cpp new file mode 100644 index 00000000..7ce41d09 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30061-class-init.cpp @@ -0,0 +1,62 @@ + +class Foo : public Bar +{ + +}; + +#define CTOR(i, _) : T(X()), \ + y() \ +{ } + +class Foo2 : + public Bar +{ + +}; + +class GLOX_API ClientBase : public Class, public OtherClass, + public ThridClass, public ForthClass +{ +public: +ClientBase(const ClientBase & f){ + // do something +} +}; + +ClientBase::ClientBase (const std::string& ns, + const std::string& ns1, + const std::string& ns2) +{ + +} + +Foo::Foo(int bar) : someVar(bar), othervar(0) +{ +} + +Foo::Foo(int bar) : someVar(bar), + othervar(0) +{ +} + +Foo::Foo(int bar) : + someVar(bar), othervar(0) +{ +} + +Foo::Foo(int bar) : + someVar(bar), othervar(0) +{ +} + +Foo::Foo(int bar) : + someVar(bar), + othervar(0) +{ +} + +Foo::Foo(int bar) : + someVar(bar), + othervar(0) +{ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30062-class-init.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30062-class-init.cpp new file mode 100644 index 00000000..53ce4a31 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30062-class-init.cpp @@ -0,0 +1,62 @@ + +class Foo : public Bar +{ + +}; + +#define CTOR(i, _) : T(X()), \ + y() \ +{ } + +class Foo2 + : public Bar +{ + +}; + +class GLOX_API ClientBase : public Class, public OtherClass, + public ThridClass, public ForthClass +{ +public: +ClientBase(const ClientBase & f){ + // do something +} +}; + +ClientBase::ClientBase (const std::string& ns, + const std::string& ns1, + const std::string& ns2) +{ + +} + +Foo::Foo(int bar) : someVar(bar), othervar(0) +{ +} + +Foo::Foo(int bar) : someVar(bar), + othervar(0) +{ +} + +Foo::Foo(int bar) + : someVar(bar), othervar(0) +{ +} + +Foo::Foo(int bar) + : someVar(bar), othervar(0) +{ +} + +Foo::Foo(int bar) + : someVar(bar), + othervar(0) +{ +} + +Foo::Foo(int bar) + : someVar(bar), + othervar(0) +{ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30063-class-init.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30063-class-init.cpp new file mode 100644 index 00000000..ad278c90 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30063-class-init.cpp @@ -0,0 +1,72 @@ + +class Foo : + public Bar +{ + +}; + +#define CTOR(i, _) : \ + T(X()), \ + y() \ +{ } + +class Foo2 : + public Bar +{ + +}; + +class GLOX_API ClientBase : + public Class, + public OtherClass, + public ThridClass, + public ForthClass +{ +public: +ClientBase(const ClientBase & f){ + // do something +} +}; + +ClientBase::ClientBase (const std::string& ns, + const std::string& ns1, + const std::string& ns2) +{ + +} + +Foo::Foo(int bar) : + someVar(bar), + othervar(0) +{ +} + +Foo::Foo(int bar) : + someVar(bar), + othervar(0) +{ +} + +Foo::Foo(int bar) : + someVar(bar), + othervar(0) +{ +} + +Foo::Foo(int bar) : + someVar(bar), + othervar(0) +{ +} + +Foo::Foo(int bar) : + someVar(bar), + othervar(0) +{ +} + +Foo::Foo(int bar) : + someVar(bar), + othervar(0) +{ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30064-class-init.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30064-class-init.cpp new file mode 100644 index 00000000..c44bdfd3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30064-class-init.cpp @@ -0,0 +1,72 @@ + +class Foo + : public Bar +{ + +}; + +#define CTOR( i, _ ) \ + : T( X() ), \ + y() \ + { } + +class Foo2 + : public Bar +{ + +}; + +class GLOX_API ClientBase + : public Class, + public OtherClass, + public ThridClass, + public ForthClass +{ +public: +ClientBase( const ClientBase & f ){ + // do something +} +}; + +ClientBase::ClientBase ( const std::string& ns, + const std::string& ns1, + const std::string& ns2 ) +{ + +} + +Foo::Foo( int bar ) + : someVar( bar ), + othervar( 0 ) +{ +} + +Foo::Foo( int bar ) + : someVar( bar ), + othervar( 0 ) +{ +} + +Foo::Foo( int bar ) + : someVar( bar ), + othervar( 0 ) +{ +} + +Foo::Foo( int bar ) + : someVar( bar ), + othervar( 0 ) +{ +} + +Foo::Foo( int bar ) + : someVar( bar ), + othervar( 0 ) +{ +} + +Foo::Foo( int bar ) + : someVar( bar ), + othervar( 0 ) +{ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30065-Example.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30065-Example.h new file mode 100644 index 00000000..1a868d10 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30065-Example.h @@ -0,0 +1,11 @@ +class Example
+{
+
+Example()
+ : member(0)
+{
+}
+
+int member;
+
+};
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30066-class-init.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30066-class-init.cpp new file mode 100644 index 00000000..1fc8bb57 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30066-class-init.cpp @@ -0,0 +1,68 @@ + +class Foo : public Bar +{ + +}; + +#define CTOR( i, _ ) : T( X() ) \ + , y() \ +{ } + +class Foo2 : public Bar +{ + +}; + +class GLOX_API ClientBase : public Class + , public OtherClass + , public ThridClass + , public ForthClass +{ +public: +ClientBase( const ClientBase & f ){ + // do something +} +}; + +ClientBase::ClientBase ( const std::string& ns, + const std::string& ns1, + const std::string& ns2 ) +{ + +} + +Foo::Foo( int bar ) + : someVar( bar ) + , othervar( 0 ) +{ +} + +Foo::Foo( int bar ) + : someVar( bar ) + , othervar( 0 ) +{ +} + +Foo::Foo( int bar ) + : someVar( bar ) + , othervar( 0 ) +{ +} + +Foo::Foo( int bar ) + : someVar( bar ) + , othervar( 0 ) +{ +} + +Foo::Foo( int bar ) + : someVar( bar ) + , othervar( 0 ) +{ +} + +Foo::Foo( int bar ) + : someVar( bar ) + , othervar( 0 ) +{ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30067-nl_func_type_name.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30067-nl_func_type_name.cpp new file mode 100644 index 00000000..a30a08e9 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30067-nl_func_type_name.cpp @@ -0,0 +1,86 @@ + +//zero +// one +// two +// three +void foo(void); + +struct A +{ +public: + long_complicated_type f(); + A& operator+(const A& other); +}; + +A& A::operator+(const A& other) +{ +} + +B +operator+(const B& other) +{ +} + +B foo(const B& other) +{ +} + +class A +{ +public: +explicit A(int); +int aFunct() { + return a; +} +int bFunc(); +}; + +// Another file +int +A +::bFunc() +{ +// some code +} + +template<typename T> +typename Foo<T>::Type Foo<T> +::Func() +{ +} + +void Foo +::bar() { +} + +namespace foo { +Foo +::Foo() { +} +} + +Foo::~Foo() { +} + +class Object +{ +~Object(void); +}; + +template <class T> +void SampleClassTemplate<T> +::connect() +{ +} + +template <> +inline void bar<MyType>(MyType r) +{ + foo(r); +} + +template <T> +inline void baz<>(T r) +{ + foo(r); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30068-nl_func_scope_name.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30068-nl_func_scope_name.cpp new file mode 100644 index 00000000..1e4caa86 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30068-nl_func_scope_name.cpp @@ -0,0 +1,4 @@ +void A +::f() +{ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30069-class-implementation.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30069-class-implementation.cpp new file mode 100644 index 00000000..18481338 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30069-class-implementation.cpp @@ -0,0 +1,28 @@ +template<class T> +class TestTemp +{ +public: +TestTemp(); +void SetValue( T obj_i ); +T Getalue(); +private: +T m_Obj; +}; + +template <class T> +TestTemp<T> +::TestTemp() +{ +} +template <class T> +void TestTemp<T> +::SetValue( T obj_i ) +{ +} + +template <class T> +T TestTemp<T> +::Getalue() +{ + return m_Obj; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30070-nl_func_scope_name.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30070-nl_func_scope_name.cpp new file mode 100644 index 00000000..c14a06ed --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30070-nl_func_scope_name.cpp @@ -0,0 +1,4 @@ +void A:: +f() +{ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30071-lineEndings-Mac.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30071-lineEndings-Mac.cpp new file mode 100644 index 00000000..20fa083a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30071-lineEndings-Mac.cpp @@ -0,0 +1,9 @@ +int main ()
+{
+ a = 5;
+ bbbb = 6.0;
+ int a = 5;
+ float bbbb = 6.0;
+
+ bbbb = 1.0
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30072-lineEndings-Win.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30072-lineEndings-Win.cpp new file mode 100644 index 00000000..cdbf7653 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30072-lineEndings-Win.cpp @@ -0,0 +1,9 @@ +int main () +{ + a = 5; + bbbb = 6.0; + int a = 5; + float bbbb = 6.0; + + bbbb = 1.0 +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30073-lineEndings-Unix.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30073-lineEndings-Unix.cpp new file mode 100644 index 00000000..608952c0 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30073-lineEndings-Unix.cpp @@ -0,0 +1 @@ +int main ()
{
a = 5;
bbbb = 6.0;
int a = 5;
float bbbb = 6.0;
bbbb = 1.0
}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30074-bom.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30074-bom.cpp new file mode 100644 index 00000000..7ee7e7e6 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30074-bom.cpp @@ -0,0 +1,3 @@ +// the file is UTF-8 Unicode (with BOM) +// Euro character +€; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30075-goto.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30075-goto.cpp new file mode 100644 index 00000000..4cccfe2c --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30075-goto.cpp @@ -0,0 +1,11 @@ +#define x struct z
+#define max(a, b) ((a) > (b) ? (a) : (b))
+
+void f()
+{
+ goto p;
+p:
+ goto q;
+q:
+ goto p;
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30076-Issue_2594.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30076-Issue_2594.cpp new file mode 100644 index 00000000..240e19db --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30076-Issue_2594.cpp @@ -0,0 +1,17 @@ +int GPUReconstructionOCL2Backend::GetOCLPrograms() +{ + +#ifdef OPENCL2_ENABLED_SPIRV // clang-format off + if (ver >= 2.2) + { + mInternals->program = clCreateProgramWithIL(mInternals->context, _makefile_opencl_program_Base_opencl_GPUReconstructionOCL2_cl_spirv, _makefile_opencl_program_Base_opencl_GPUReconstructionOCL2_cl_spirv_size, &ocl_error); + } else + { + size_t program_sizes[1] = {_makefile_opencl_program_Base_opencl_GPUReconstructionOCL2_cl_src_size}; + char* programs_sources[1] = {_makefile_opencl_program_Base_opencl_GPUReconstructionOCL2_cl_src}; + mInternals->program = clCreateProgramWithSource(mInternals->context, (cl_uint) 1, (const char**) &programs_sources, program_sizes, &ocl_error); + } +#endif // clang-format on + + return 0; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30077-Issue_2596.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30077-Issue_2596.cpp new file mode 100644 index 00000000..d2517e8b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30077-Issue_2596.cpp @@ -0,0 +1,5 @@ +void function(void) { + int a = 0; + int b = (a==1)?1:2; + int c = (a==1) ? 1 : 2; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30078-Issue_2672-a.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30078-Issue_2672-a.cpp new file mode 100644 index 00000000..d29d2c47 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30078-Issue_2672-a.cpp @@ -0,0 +1,10 @@ +struct Point2D +{ + float x; + float y; +}; + +struct : Point2D +{ + float z; +} point; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30079-Issue_2672-b.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30079-Issue_2672-b.cpp new file mode 100644 index 00000000..f484d4ff --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30079-Issue_2672-b.cpp @@ -0,0 +1,2 @@ +struct BaseStruct {}; +struct : BaseStruct {}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30080-nl_brace_brace.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30080-nl_brace_brace.cpp new file mode 100644 index 00000000..a9783697 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30080-nl_brace_brace.cpp @@ -0,0 +1,20 @@ + +SHOW_VAR status_vars[]= { + { "Aborted_clients", (char *)&aborted_threads, + SHOW_LONGLONG, } +}; + +SHOW_VAR status_vars[]= +{ + { "Aborted_clients", (char *)&aborted_threads, + SHOW_LONGLONG, } +}; + +SHOW_VAR status_vars[]= +{ + { + "Aborted_clients", (char *)&aborted_threads, + SHOW_LONGLONG, + } +}; + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30081-Issue_2383.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30081-Issue_2383.cpp new file mode 100644 index 00000000..356fd9af --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30081-Issue_2383.cpp @@ -0,0 +1,7 @@ +// Smooth +// Copyright (C) 2017 Per +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30082-Issue_931.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30082-Issue_931.cpp new file mode 100644 index 00000000..76a6b856 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30082-Issue_931.cpp @@ -0,0 +1,7 @@ +//we manually indented continuation here to prevent 'reallyLongArgumentName' from crossing +//our line length limit +void ReallyLongClassName::ReallyLongMethondName(int arg1, + int reallyLongArgumentName) + +void LongClassName::LongMethondName(int arg1, + int reallyLongArgumentName) diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30083-Issue_995-do.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30083-Issue_995-do.cpp new file mode 100644 index 00000000..2e84d7ce --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30083-Issue_995-do.cpp @@ -0,0 +1,3 @@ +do { + xxx = _error; +} while (0) diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30084-Issue_1184.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30084-Issue_1184.cpp new file mode 100644 index 00000000..848b1e03 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30084-Issue_1184.cpp @@ -0,0 +1,4 @@ +char buf [2000]; + +buf[0] = 5; +buf[1] = 6; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30085-align_class.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30085-align_class.cpp new file mode 100644 index 00000000..552d6947 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30085-align_class.cpp @@ -0,0 +1,14 @@ +//---------------------------------------------------------------------------
+// Statics |
+//---------------------------------------------------------------------------
+void CTdrFile::SetDistanceMode( TDistMode dm ) { CTdrFile::ms_DistMode = dm; }
+TDistMode CTdrFile::GetDistanceMode( void ) { return CTdrFile::ms_DistMode; }
+String CTdrFile::GetDistanceModeUnits( void ) { return ( CTdrFile::GetDistanceMode() == dmKM ) ? "km" : "Miles"; }
+void CTdrFile::SetBSTCompensation( bool bUseBST ){ ms_bCompBST = bUseBST; }
+void CTdrFile::SetFactoryMode( bool bFactory ) { ms_bFactory = bFactory; }
+bool CTdrFile::GetFactoryMode( void ) { return ms_bFactory; }
+
+unsigned int CAgentCharacter::iReferenceCount = 0;
+IAgentEx* CAgentCharacter::pAgentEx = NULL;
+CAgentNotifySink* CAgentCharacter::pSink = NULL;
+
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30086-align_class-constr.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30086-align_class-constr.cpp new file mode 100644 index 00000000..f6082028 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30086-align_class-constr.cpp @@ -0,0 +1,10 @@ +class foo : public my_Class +{ + void bar_c(int tttt, int uu, int abc, int defxx) + : tttt (4444) + , uu (22) + , abc (333) + , defxx (55555) + { + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30087-Issue_1511.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30087-Issue_1511.cpp new file mode 100644 index 00000000..2583c0e3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30087-Issue_1511.cpp @@ -0,0 +1 @@ +int getFoo() { return foo; } diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30088-Issue_2561.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30088-Issue_2561.cpp new file mode 100644 index 00000000..aa566966 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30088-Issue_2561.cpp @@ -0,0 +1,11 @@ +#include <stdio.h> + +int getFoo () { return foo; } + +int +main (int argc, char *argv[]) +{ + printf("hello world!\n"); + + return 0; +} // main diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30089-Issue_2281.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30089-Issue_2281.cpp new file mode 100644 index 00000000..e0d8727d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30089-Issue_2281.cpp @@ -0,0 +1,24 @@ +int foo(int op) +{ + switch (op) + { + case 1: + do_something(); + break; + case 2: + do_something_else(); + case 3: + if (do_something_different()) + { + do_this(); + break; // this should be indented like the surrounding code + } + do_something_more(); + break; + } + return -1; + for (;;) + { + break; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30090-bug_488.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30090-bug_488.cpp new file mode 100644 index 00000000..268d5ba4 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30090-bug_488.cpp @@ -0,0 +1,12 @@ +void baz() +{ + foobar= bar[a + b + (c + + d)]; + + foobar = bar(a + b + (c + + +d)); + + foo = bar[a] + b + qux(c + + +d); +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30091-bug_472.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30091-bug_472.cpp new file mode 100644 index 00000000..e48251fe --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30091-bug_472.cpp @@ -0,0 +1,2 @@ +// comment +void func( dbgTrace, (void) ); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30092-bug_481.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30092-bug_481.cpp new file mode 100644 index 00000000..99d8c390 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30092-bug_481.cpp @@ -0,0 +1,2 @@ +//comment +void argvInter(int argc, char *argv[], Config *config); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30093-bug_484.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30093-bug_484.cpp new file mode 100644 index 00000000..875ff3d2 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30093-bug_484.cpp @@ -0,0 +1,6 @@ +TestId::TestId(char *name) : + n_((char *) name) +{ + n_((char *) name); +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30094-bug_495.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30094-bug_495.cpp new file mode 100644 index 00000000..d7db1238 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30094-bug_495.cpp @@ -0,0 +1,9 @@ +void f() +{ + toto + foo1(int); + toto + foo2(bar); + int + foo3; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30095-bug_485.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30095-bug_485.cpp new file mode 100644 index 00000000..b5e7842c --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30095-bug_485.cpp @@ -0,0 +1,20 @@ +void Tst::test(Msg *message_p) +{ + switch (message_p) + { + case A: + { + const table *entry2 = findMsg(message_p); + table *entry3 = findMsg(message_p); + } + break; + + case B: + const table *entry2 = findMsg(message_p); + table *entry3 = findMsg(message_p); + break; + + default: + break; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30096-bug_1854.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30096-bug_1854.cpp new file mode 100644 index 00000000..29cc2774 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30096-bug_1854.cpp @@ -0,0 +1 @@ +while (*p++ = ' ') ; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30097-issue_1946.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30097-issue_1946.cpp new file mode 100644 index 00000000..9682da68 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30097-issue_1946.cpp @@ -0,0 +1,5 @@ +namespace foo +{ +long_type_name_t &foo1(); +foo_t &foo2(); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30098-Issue_2692.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30098-Issue_2692.cpp new file mode 100644 index 00000000..4173ad5d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30098-Issue_2692.cpp @@ -0,0 +1,5 @@ +class Class +{ +std::mutex* a; +int* b; +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30099-bug_1127.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30099-bug_1127.cpp new file mode 100644 index 00000000..0109baaf --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30099-bug_1127.cpp @@ -0,0 +1,20 @@ +#include <iostream> + +template<size_t T> +class MyFoo +{ +public: +MyFoo() +{ + std::cout << T << std::endl; +} +}; + +int main() +{ + const size_t mySize = INT8_MAX * 2; + MyFoo<mySize * 2> foo1; + MyFoo<mySize / 2> foo2; + MyFoo<2 * mySize> foo1; + MyFoo<2 / mySize> foo2; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30100-templates.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30100-templates.cpp new file mode 100644 index 00000000..e4dd89e5 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30100-templates.cpp @@ -0,0 +1,200 @@ +#include <list> +#include <map> +#include <vector> + +#define MACRO(T) f<T>() + +class MyClass +{ +public: + std::map < int, bool > someData; + std::map < int, std::list < bool > > otherData; +}; + +void foo() +{ + List < byte > bob = new List<byte>(); + +} + +A<B> foo; +A<B,C> bar; +A<B*> baz; +A<B<C> > bay; + +void asd(void) +{ + A<B> foo; + A<B,C> bar; + A<B*> baz; + A<B<C> > bay; + if (a < b && b > c) + { + a = b < c > 0; + } + if (a < bar() > c) + { + } + a < up_lim() ? do_hi() : do_low; + a[ a<b> c] = d; +} + +template<typename T> +class MyClass +{ + +} + +template<typename T> +class MyClass +{ +} + +template<typename A, typename B, typename C> +class MyClass : myvar(0), + myvar2(0) +{ + +} + +template<typename A, typename B, typename C> +class MyClass + : myvar(0), + myvar2(0) +{ + +} + + +static int max_value() +{ + return (std :: numeric_limits <int >:: max ) (); +} + +template < class Config_ > +priority_queue < Config_ > :: ~priority_queue () { + +} + +template<class T> +T test(T a) { + return a; +} + +int main() { + int k; + int j; + h g<int>; + k=test<int> (j); + return 0; +} + +template<typename T, template<typename, unsigned int, unsigned int> class ConcreteStorageClass> +class RotationMatrix + : public StaticBaseMatrix<T, 3, 3, ConcreteStorageClass> +{ + +public: + + RotationMatrix() + : StaticBaseMatrix<T, 3, 3, ConcreteStorageClass>() + { + // do some initialization + } + + void assign(const OtherClass<T, 3, 3 >& other) + { + // do something + } + +}; + +int main() +{ + MyClass<double, 3, 3, MyStorage> foo; +} + +template< typename CharT, int N, typename Traits > +inline std::basic_ostream<CharT,Traits>& FWStreamOut(std::basic_ostream<CharT,Traits>& os, + const W::S<CharT,N,Traits>& s) +{ + return operator << <CharT, N, Traits, char, std::char_traits<char> > ( os, s ); +} + +struct foo { + type1 < int& > bar; +}; +struct foo { + type1 < int const > bar; +}; + + +template <int i> +void f(); +template <int i> +void g() { + f<i - 1>(); + f< i >(); + f<i + 1>(); + f<bar()>(); +} +void h() { + g<42>(); +} + +#include <vector> +std::vector<int> A(2); +std::vector<int> B; +std::vector<int> C(2); +std::vector<int> D; + +template<class T> +struct X { template<class U> + void operator ()(U); }; + +template<class T> +class Y { template<class V> + void f(V); }; + +void (* foobar)(void) = NULL; +std::vector<void (*)(void)> functions; + +#define MACRO( a ) a +template < typename = int > +class X; +MACRO ( void f( X < >& x ) ); +void g( X < >& x ); + +#include <vector> +typedef std::vector<std::vector<int> > Table; // OK +typedef std::vector<std::vector<bool> > Flags; // Error + +void func(List<B> = default_val1); +void func(List<List<B> > = default_val2); + +BLAH<(3.14 >= 42)> blah; +bool X = j<3> > 1; + +void foo() +{ + A<(X > Y)> a; + a = static_cast<List<B> >(ld); +} + +template<int i> +class X { /* ... */ }; +X < 1 > 2 > x1; // Syntax error. +X<(1 > 2)> x2; // Okay. + +template<class T> +class Y { /* ... */ }; +Y<X<1> > x3; // Okay, same as "Y<X<1> > x3;". +Y<X<(6 >> 1)> > x4; + + +template <typename T> +int +myFunc1(typename T::Subtype val); + +int +myFunc2(T::Subtype val); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30101-templates.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30101-templates.cpp new file mode 100644 index 00000000..78a60ebd --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30101-templates.cpp @@ -0,0 +1,182 @@ +#include <list> +#include <map> +#include <vector> + +#define MACRO(T) f<T>() + +class MyClass +{ +public: + std::map < int, bool > someData; + std::map < int, std::list < bool > > otherData; +}; + +void foo() +{ + List < byte > bob = new List<byte>(); + +} + +A<B> foo; +A<B,C> bar; +A<B*> baz; +A<B<C> > bay; + +void asd(void) +{ + A<B> foo; + A<B,C> bar; + A<B*> baz; + A<B<C> > bay; + if (a < b && b > c) + { + a = b < c > 0; + } + if (a < bar() > c) + { + } + a < up_lim() ? do_hi() : do_low; + a[ a<b> c] = d; +} + +template<typename T> class MyClass +{ + +} + +template<typename T> class MyClass +{ +} + +template<typename A, typename B, typename C> class MyClass : myvar(0), + myvar2(0) +{ + +} + +template<typename A, typename B, typename C> class MyClass + : myvar(0), + myvar2(0) +{ + +} + + +static int max_value() +{ + return (std :: numeric_limits <int >:: max ) (); +} + +template < class Config_ > priority_queue < Config_ > :: ~priority_queue () { + +} + +template<class T> T test(T a) { + return a; +} + +int main() { + int k; + int j; + h g<int>; + k=test<int> (j); + return 0; +} + +template<typename T, template<typename, unsigned int, unsigned int> class ConcreteStorageClass> class RotationMatrix + : public StaticBaseMatrix<T, 3, 3, ConcreteStorageClass> +{ + +public: + + RotationMatrix() + : StaticBaseMatrix<T, 3, 3, ConcreteStorageClass>() + { + // do some initialization + } + + void assign(const OtherClass<T, 3, 3 >& other) + { + // do something + } + +}; + +int main() +{ + MyClass<double, 3, 3, MyStorage> foo; +} + +template< typename CharT, int N, typename Traits > inline std::basic_ostream<CharT,Traits>& FWStreamOut(std::basic_ostream<CharT,Traits>& os, + const W::S<CharT,N,Traits>& s) +{ + return operator << <CharT, N, Traits, char, std::char_traits<char> > ( os, s ); +} + +struct foo { + type1 < int& > bar; +}; +struct foo { + type1 < int const > bar; +}; + + +template <int i> void f(); +template <int i> void g() { + f<i - 1>(); + f< i >(); + f<i + 1>(); + f<bar()>(); +} +void h() { + g<42>(); +} + +#include <vector> +std::vector<int> A(2); +std::vector<int> B; +std::vector<int> C(2); +std::vector<int> D; + +template<class T> struct X { template<class U> void operator ()(U); }; + +template<class T> class Y { template<class V> void f(V); }; + +void (* foobar)(void) = NULL; +std::vector<void (*)(void)> functions; + +#define MACRO( a ) a +template < typename = int > class X; +MACRO ( void f( X < >& x ) ); +void g( X < >& x ); + +#include <vector> +typedef std::vector<std::vector<int> > Table; // OK +typedef std::vector<std::vector<bool> > Flags; // Error + +void func(List<B> = default_val1); +void func(List<List<B> > = default_val2); + +BLAH<(3.14 >= 42)> blah; +bool X = j<3> > 1; + +void foo() +{ + A<(X > Y)> a; + a = static_cast<List<B> >(ld); +} + +template<int i> class X { /* ... */ }; +X < 1 > 2 > x1; // Syntax error. +X<(1 > 2)> x2; // Okay. + +template<class T> class Y { /* ... */ }; +Y<X<1> > x3; // Okay, same as "Y<X<1> > x3;". +Y<X<(6 >> 1)> > x4; + + +template <typename T> int +myFunc1(typename T::Subtype val); + +int +myFunc2(T::Subtype val); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30102-templates.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30102-templates.cpp new file mode 100644 index 00000000..86bbfaf7 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30102-templates.cpp @@ -0,0 +1,188 @@ +#include <list> +#include <map> +#include <vector> + +#define MACRO(T) f < T > () + +class MyClass +{ +public: + std::map < int, bool > someData; + std::map < int, std::list < bool > > otherData; +}; + +void foo() +{ + List < byte > bob = new List < byte > (); + +} + +A < B > foo; +A < B,C > bar; +A < B* > baz; +A < B < C > > bay; + +void asd(void) +{ + A < B > foo; + A < B,C > bar; + A < B* > baz; + A < B < C > > bay; + if (a<b && b>c) + { + a = b<c>0; + } + if (a < bar() > c) + { + } + a<up_lim() ? do_hi() : do_low; + a[ a < b > c] = d; +} + +template< typename T > class MyClass +{ + +} + +template< typename T > +class MyClass +{ +} + +template< typename A, typename B, typename C > class MyClass : myvar(0), + myvar2(0) +{ + +} + +template< typename A, typename B, typename C > class MyClass + : myvar(0), + myvar2(0) +{ + +} + + +static int max_value() +{ + return (std :: numeric_limits < int >:: max ) (); +} + +template< class Config_ > +priority_queue < Config_ > :: ~priority_queue () { + +} + +template< class T > +T test(T a) { + return a; +} + +int main() { + int k; + int j; + h g < int >; + k=test < int > (j); + return 0; +} + +template< typename T, template< typename, unsigned int, unsigned int > class ConcreteStorageClass > +class RotationMatrix + : public StaticBaseMatrix < T, 3, 3, ConcreteStorageClass > +{ + +public: + + RotationMatrix() + : StaticBaseMatrix < T, 3, 3, ConcreteStorageClass > () + { + // do some initialization + } + + void assign(const OtherClass < T, 3, 3 >& other) + { + // do something + } + +}; + +int main() +{ + MyClass < double, 3, 3, MyStorage > foo; +} + +template< typename CharT, int N, typename Traits > +inline std::basic_ostream < CharT,Traits >& FWStreamOut(std::basic_ostream < CharT,Traits >& os, + const W::S < CharT,N,Traits >& s) +{ + return operator << < CharT, N, Traits, char, std::char_traits < char > > ( os, s ); +} + +struct foo { + type1 < int& > bar; +}; +struct foo { + type1 < int const > bar; +}; + + +template< int i > void f(); +template< int i > void g() { + f < i - 1 > (); + f < i > (); + f < i + 1 > (); + f < bar() > (); +} +void h() { + g < 42 > (); +} + +#include <vector> +std::vector < int > A(2); +std::vector < int > B; +std::vector < int > C(2); +std::vector < int > D; + +template< class T > struct X { template< class U > void operator ()(U); }; + +template< class T > class Y { template< class V > void f(V); }; + +void (* foobar)(void) = NULL; +std::vector < void (*)(void) > functions; + +#define MACRO( a ) a +template< typename = int > class X; +MACRO ( void f( X < >& x ) ); +void g( X < >& x ); + +#include <vector> +typedef std::vector < std::vector < int > > Table; // OK +typedef std::vector < std::vector < bool > > Flags; // Error + +void func(List < B > = default_val1); +void func(List < List < B > > = default_val2); + +BLAH < (3.14>=42) > blah; +bool X = j < 3 > >1; + +void foo() +{ + A < (X>Y) > a; + a = static_cast < List < B > > (ld); +} + +template< int i > class X { /* ... */ }; +X<1>2>x1; // Syntax error. +X < (1>2) > x2; // Okay. + +template< class T > class Y { /* ... */ }; +Y < X < 1 > > x3; // Okay, same as "Y<X<1> > x3;". +Y < X < (6 >> 1) > > x4; + + +template< typename T > +int +myFunc1(typename T::Subtype val); + +int +myFunc2(T::Subtype val); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30103-templates.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30103-templates.cpp new file mode 100644 index 00000000..adadb882 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30103-templates.cpp @@ -0,0 +1,188 @@ +#include <list> +#include <map> +#include <vector> + +#define MACRO(T) f<T>() + +class MyClass +{ +public: + std::map<int, bool>someData; + std::map<int, std::list<bool> >otherData; +}; + +void foo() +{ + List<byte>bob = new List<byte>(); + +} + +A<B>foo; +A<B,C>bar; +A<B*>baz; +A<B<C> >bay; + +void asd(void) +{ + A<B>foo; + A<B,C>bar; + A<B*>baz; + A<B<C> >bay; + if (a < b && b > c) + { + a = b < c > 0; + } + if (a<bar()>c) + { + } + a < up_lim() ? do_hi() : do_low; + a[ a<b>c] = d; +} + +template<typename T>class MyClass +{ + +} + +template<typename T> +class MyClass +{ +} + +template<typename A, typename B, typename C>class MyClass : myvar(0), + myvar2(0) +{ + +} + +template<typename A, typename B, typename C>class MyClass + : myvar(0), + myvar2(0) +{ + +} + + +static int max_value() +{ + return (std :: numeric_limits<int>:: max )(); +} + +template<class Config_> +priority_queue<Config_> :: ~priority_queue () { + +} + +template<class T> +T test(T a) { + return a; +} + +int main() { + int k; + int j; + h g<int>; + k=test<int> (j); + return 0; +} + +template<typename T, template<typename, unsigned int, unsigned int>class ConcreteStorageClass> +class RotationMatrix + : public StaticBaseMatrix<T, 3, 3, ConcreteStorageClass> +{ + +public: + + RotationMatrix() + : StaticBaseMatrix<T, 3, 3, ConcreteStorageClass>() + { + // do some initialization + } + + void assign(const OtherClass<T, 3, 3>& other) + { + // do something + } + +}; + +int main() +{ + MyClass<double, 3, 3, MyStorage>foo; +} + +template<typename CharT, int N, typename Traits> +inline std::basic_ostream<CharT,Traits>& FWStreamOut(std::basic_ostream<CharT,Traits>& os, + const W::S<CharT,N,Traits>& s) +{ + return operator<<<CharT, N, Traits, char, std::char_traits<char> > ( os, s ); +} + +struct foo { + type1<int&>bar; +}; +struct foo { + type1<int const>bar; +}; + + +template<int i>void f(); +template<int i>void g() { + f<i - 1>(); + f<i>(); + f<i + 1>(); + f<bar()>(); +} +void h() { + g<42>(); +} + +#include <vector> +std::vector<int>A(2); +std::vector<int>B; +std::vector<int>C(2); +std::vector<int>D; + +template<class T>struct X { template<class U>void operator()(U); }; + +template<class T>class Y { template<class V>void f(V); }; + +void (* foobar)(void) = NULL; +std::vector<void (*)(void)>functions; + +#define MACRO( a ) a +template<typename = int>class X; +MACRO( void f( X<>& x ) ); +void g( X<>& x ); + +#include <vector> +typedef std::vector<std::vector<int> >Table; // OK +typedef std::vector<std::vector<bool> >Flags; // Error + +void func(List<B> = default_val1); +void func(List<List<B> > = default_val2); + +BLAH<(3.14 >= 42)>blah; +bool X = j<3> > 1; + +void foo() +{ + A<(X > Y)>a; + a = static_cast<List<B> >(ld); +} + +template<int i>class X { /* ... */ }; +X < 1 > 2 > x1; // Syntax error. +X<(1 > 2)>x2; // Okay. + +template<class T>class Y { /* ... */ }; +Y<X<1> >x3; // Okay, same as "Y<X<1> > x3;". +Y<X<(6 >> 1)> >x4; + + +template<typename T> +int +myFunc1(typename T::Subtype val); + +int +myFunc2(T::Subtype val); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30104-templ_class.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30104-templ_class.h new file mode 100644 index 00000000..802f7e27 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30104-templ_class.h @@ -0,0 +1,15 @@ +template<typename T, template<typename> class SpecialClass> +class Example +{ + // Copy constructor with other variants of Example + template<template<typename> class OtherSpecialClass> + Example(const Example<T, OtherSpecialClass>& other) + { + // do something useful here + } + + /** The normal member var based on the template arguments */ + SpecialClass<T> memberVar; + +}; + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30105-av.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30105-av.h new file mode 100644 index 00000000..6efe8e9b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30105-av.h @@ -0,0 +1,52 @@ +/* + 2) There seems to be a problem handling .h-files compared to .cpp-files. + The following problem only occurs in header-files, in source-files the + output is as desired. + */ + +static inline void foo() +{ +//BEFORE: + if (cond) { + callFunc(); + } +// DESIRED: + if (cond) { + callFunc(); + } +// AFTER: + if (cond) { + callFunc(); + } + + +/* + 3) The spacing around pointer stars is not always maintained as desired. + */ +//BEFORE: + Buffer<T>* buffer; +//AFTER: + Buffer<T>* buffer; + + +/* + 4) Inside of casts the types are not formatted as outside. + */ +//BEFORE: + T* t = dynamic_cast<T*>(obj); +//AFTER: + T* t = dynamic_cast<T*>(obj); + +/* + 5) Inside some template-stuff the spacing goes weird. Multiple spaces + are inserted, although the configuration (should) say otherwise. + */ +//BEFORE: + for (std::map<Key, Value*>::iterator it = map.begin(); it != map.end(); it++) { + bar(it); + } +//AFTER: + for (std::map<Key, Value*>::iterator it = map.begin(); it != map.end(); it++) { + bar(it); + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30106-templates2.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30106-templates2.cpp new file mode 100644 index 00000000..48f56d99 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30106-templates2.cpp @@ -0,0 +1,54 @@ +void f() +{ + call_a_function(42, + double(-1), + "charray"); + call_a_function(42, + double(-1), + "charray" + ); + call_a_function( + 42, + double(-1), + "charray" + ); + call_a_template_function<int, + int, + int> + (42); + call_a_template_function<int, + int, + int + > + (42); + call_a_template_function<int, + int, + int>(42); + call_a_template_function<int, + int, + int>( + 42 + ); + call_a_template_function< + int, + int, + int + > + (42); +} +template<class T, + class U> +class W; +template<class T, + class U + > +class X; +template< + class T, + class U> +class Y; +template< + class T, + class U + > +class Z; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30107-templates2.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30107-templates2.cpp new file mode 100644 index 00000000..a49d4381 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30107-templates2.cpp @@ -0,0 +1,50 @@ +void f() +{ + call_a_function(42, + double(-1), + "charray"); + call_a_function(42, + double(-1), + "charray" + ); + call_a_function( + 42, + double(-1), + "charray" + ); + call_a_template_function<int, + int, + int> + (42); + call_a_template_function<int, + int, + int + > + (42); + call_a_template_function<int, + int, + int>(42); + call_a_template_function<int, + int, + int>( + 42 + ); + call_a_template_function< + int, + int, + int + > + (42); +} +template<class T, + class U> class W; +template<class T, + class U + > class X; +template< + class T, + class U> class Y; +template< + class T, + class U + > class Z; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30108-templates3.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30108-templates3.cpp new file mode 100644 index 00000000..a0e20d19 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30108-templates3.cpp @@ -0,0 +1,23 @@ +template <bool a> struct T { + typedef int result; +}; +template <bool a, bool b> struct X { + typedef typename T<a || b>::result result; +}; + +template <class T> class new_alloc { +public: + void deallocate(int* p, int /*num*/) + { + T::operator delete((void*) p); + } +}; + +void test(void) +{ + return x != 0 + && x >= 1 + && x < 2 + && y >= 3 + && y < 4; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30109-templates4.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30109-templates4.cpp new file mode 100644 index 00000000..781822e8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30109-templates4.cpp @@ -0,0 +1,17 @@ +#define FOO(X) \ + template <unsigned _blk_sz, typename _run_type, class __pos_type> \ + inline X<_blk_sz, _run_type, __pos_type> operator - ( \ + const X<_blk_sz, _run_type, __pos_type> & a, \ + typename X<_blk_sz, _run_type, __pos_type>::_pos_type off) \ + { \ + return X<_blk_sz, _run_type, __pos_type>(a.array, a.pos - off); \ + } \ + template <unsigned _blk_sz, typename _run_type, class __pos_type> \ + inline X<_blk_sz, _run_type, __pos_type> & operator -= ( \ + X < _blk_sz, _run_type, __pos_type > & a, \ + typename X<_blk_sz, _run_type, __pos_type>::_pos_type off) \ + { \ + a.pos -= off; \ + return a; \ + } + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30110-class-init.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30110-class-init.cpp new file mode 100644 index 00000000..e1b1949c --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30110-class-init.cpp @@ -0,0 +1,58 @@ + +class Foo : + public Bar +{ +}; + +#define CTOR(i, _) : \ + T(X()), \ + y() \ +{ } + +class Foo2 : + public Bar +{ +}; + +class GLOX_API ClientBase : + public Class, + public OtherClass, + public ThridClass, + public ForthClass +{ + public: + ClientBase(const ClientBase& f) + { + // do something + } +}; + +ClientBase::ClientBase (const std::string& ns, + const std::string& ns1, + const std::string& ns2) +{ +} + +Foo::Foo(int bar) : someVar(bar), othervar(0) +{ +} + +Foo::Foo(int bar) : someVar(bar), othervar(0) +{ +} + +Foo::Foo(int bar) : someVar(bar), othervar(0) +{ +} + +Foo::Foo(int bar) : someVar(bar), othervar(0) +{ +} + +Foo::Foo(int bar) : someVar(bar), othervar(0) +{ +} + +Foo::Foo(int bar) : someVar(bar), othervar(0) +{ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30111-bug_1346.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30111-bug_1346.h new file mode 100644 index 00000000..2ca31e50 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30111-bug_1346.h @@ -0,0 +1,10 @@ +typename std::enable_if<!std::is_void<T>::value, QVector<T> >::type dummy(const std::function<T*(const S&)>& pFunc, const QVector<S>& pItems) +{ + return QVector<T>(); +} + + +typename std::enable_if<!std::is_void<T>::value, QVector<T> >::type filter(const std::function<bool(const T&)>& pFunc, const QVector<T>& pItems) +{ + return QVector<T>(); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30112-bug_1432.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30112-bug_1432.cpp new file mode 100644 index 00000000..575a21c8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30112-bug_1432.cpp @@ -0,0 +1,2 @@ +void set(); +vector<int> get(); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30113-bug_1452.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30113-bug_1452.cpp new file mode 100644 index 00000000..59a3babd --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30113-bug_1452.cpp @@ -0,0 +1,8 @@ +struct foobar { + char * + foobarz() { return "foobar"; } + char * + foo_bar() { return "foo_bar"; } + + int foo; +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30114-bug_1462.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30114-bug_1462.cpp new file mode 100644 index 00000000..b6a33ceb --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30114-bug_1462.cpp @@ -0,0 +1,26 @@ +#include <type_traits> + +template< + typename ... Args, + typename E = typename std::enable_if<(sizeof...(Args) >= 1), bool>::type + > +void fun1(Args&& ... args) +{ +} + +template< + typename ... Args, + typename E = typename std::enable_if<(sizeof...(Args) > 1), bool>::type + > +void fun2(Args&& ... args) +{ +} + +template< + typename ... Args, + typename E = typename std::enable_if<(sizeof...(Args) < 3), bool>::type + > +void fun3(Args&& ... args) +{ +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30115-Issue_1704.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30115-Issue_1704.cpp new file mode 100644 index 00000000..90cb2049 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30115-Issue_1704.cpp @@ -0,0 +1 @@ +#define INC_REF_COUNT(ref_count) ++ref_count diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30116-Issue_1052.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30116-Issue_1052.cpp new file mode 100644 index 00000000..0e21f136 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30116-Issue_1052.cpp @@ -0,0 +1 @@ +ut8 u32s[sizeof (ut32)] = {0}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30117-Issue_2343.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30117-Issue_2343.cpp new file mode 100644 index 00000000..a82e1172 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30117-Issue_2343.cpp @@ -0,0 +1,147 @@ +class Capteur { +public: + Capteur (); +public: + float val_num; + float val_num_prec; // La valeur précédente pour la comparaison + String tendance; // La variable text récupérée du flux Internet + String val_texte; // La variable text récupérée du flux Internet +}; + +class Capteur_CO2 + : public Capteur { +public: + Capteur_CO2() : + un_membre_en_plus ( 0 ) {} +public: + int un_membre_en_plus; +}; + + +class Salon { +public: + Capteur temperature; + Capteur humidite; + Capteur pression; + Capteur_CO2 CO2; +}; + + +typedef struct Exterieur Exterieur; +struct Exterieur { // Structure qui regroupe toutes les variables de la station météo + float temp_num; + float temp_num_prec; // La valeur précédente pour la comparaison + int humidite; + int humidite_prec; // La valeur précédente pour la comparaison + String temp_tendance; // La variable text récupérée du flux Internet + String temp_texte; // La variable text récupérée du flux Internet + String humidite_texte; // La variable text récupérée du flux Internet + Exterieur () : + temp_num ( -99.9 ), + temp_num_prec ( -99.9 ), + humidite ( 0 ), + humidite_prec ( 0 ), + temp_tendance ( "up" ), + temp_texte ( "" ), + humidite_texte ( "" ) {} +}; + + + +for ( int i = 3; i < 42; i++ ) { + Serial.print ( "TEXTE(AC" ); + Serial.print ( i ); + Serial.print ( ";\"0\");\",\";" ); +} +#define OLIVE 0x7BE0 +#define LIGHTGREY 0xC618 +#ifndef _NETATMO_FONCTIONS_WIFI_h + #define _NETATMO_FONCTIONS_WIFI_h + #if defined ( ARDUINO ) && ARDUINO >= 100 + #include "arduino.h" + #if defined ( RORO ) + #define qsijnqsijdn 1323 + // asbdsqhbdsqibd + #endif + #define qsijnqsijdn 1323 + + #else + #define qsijnqsijdn 1323 + + #include "WProgram.h" + #endif // if defined ( ARDUINO ) && ARDUINO >= 100 + #define qsijnqsijdn 1323 + +#endif // ifndef _NETATMO_FONCTIONS_WIFI_h + +// Essaie de signe=se+szde/szz-sszzd%zdzd +zzez = { 1, 2, 3 }; +toto += 1 + 2 / 9 - 3 / 2; + +int fonction ( ( int *zeze ), ( ss ) ) { ksjbshjdbshjdb = 1;} +fonction ( ( &zeze ), ( ss ) ); +fonction (); +// Définition des structures de données +typedef struct Exterieur Exterieur; +struct Exterieur { // Structure qui regroupe toutes les variables de la station météo + float temp_num; + float temp_num_prec; // La valeur précédente pour la comparaison + int humidite; + int humidite_prec; // La valeur précédente pour la comparaison + String temp_tendance; // La variable text récupérée du flux Internet +}; +Exterieur tototot = { -99, -99, -99, -99, 99 }; + +// Température Extérieure +float _Temp_Ext = -99.9; +float _Temp_Ext_Precedente = -99.9; // La valeur précédente pour la comparaison +String _Temp_Ext_Tendance = "up"; + +UTFT myGLCD ( SSD1963_800 = 1, 38, 39, 40, 41 ); // (byte model, int RS, int WR, int CS, int RST, int SER) +UTFT_Geometry geo_myGLCD ( &myGLCD ); + +const char *jour_semaine[[1], [2]] = { + "\0", + "Vendredi\0", + "Dimanche\0" +}; + +void Centrer_Nombre_Int_dans_Zone ( int _nbr, int Y, int X1, int X2, int COULEUR ); +void Centrer_Nombre_Float_dans_Zone ( float _nbr, int Y, int X1, int X2, int COULEUR ); + +void Centrer_Nombre_Int_dans_Zone ( int _nbr, int Y, int X1, int X2, int COULEUR ) { + toto = 1 + 2 / 9 - 3 / 2; + String _texte = String ( _nbr, 1 ); + if ( X2 > X1 ) { + X = X1 + ( X2 - X1 + 1 - _texte.length () * myGLCD.getFontXsize () ) / 2; + } + else { + X = X2 + ( X1 - X2 - myGLCD.getFontXsize () ) / 2; + } + if ( X <= 0 ) { + Serial.print ( F ( "-- Erreur dans le fonction Centrer_Nombre_Int_dans_Zone : la valeur calculée de X est négative ou nulle, elle vaut :" ) ); + Serial.println ( X ); + Serial.print ( F ( "Le texte qui génère cette erreur est : " ) ); + Serial.println ( _texte ); + } + else { + myGLCD.setColor ( COULEUR ); + myGLCD.printNumI ( _nbr, X, Y ); + } +} + +void Texte_Bonjour () { + myGLCD.setColor ( VGA_AQUA ); + myGLCD.setBackColor ( VGA_TRANSPARENT ); + + + + myGLCD.setFont ( Grotesk32x64 ); + myGLCD.print ( F ( "BONJOUR" ), CENTER, 20 ); + myGLCD.setFont ( BigFont ); + myGLCD.print ( F ( "*** NETATMO AFFICHAGE DEPORTE ***" ), CENTER, 100 ); + myGLCD.print ( F ( "Debut : Mai 2019 / MAJ : Juillet 2019" ), CENTER, 120 ); +} + + + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30118-Issue_2758.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30118-Issue_2758.cpp new file mode 100644 index 00000000..576b1bef --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30118-Issue_2758.cpp @@ -0,0 +1,4 @@ +// a function call: +int a = b( + 5 + ); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30119-Issue_2879.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30119-Issue_2879.cpp new file mode 100644 index 00000000..fbc323ae --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30119-Issue_2879.cpp @@ -0,0 +1,7 @@ +class CObject +{ +void f() +{ + CObject obj( b1 && c1, b2 && c2 ); +} +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30120-sp_after_angle.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30120-sp_after_angle.cpp new file mode 100644 index 00000000..04af5289 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30120-sp_after_angle.cpp @@ -0,0 +1,6 @@ +template< typename T > +struct foo {}; + +Q_DECLARE_METATYPE(foo < int > ) + +int bar(foo < int > ); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30121-sp_after_angle.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30121-sp_after_angle.cpp new file mode 100644 index 00000000..8764578e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30121-sp_after_angle.cpp @@ -0,0 +1,6 @@ +template<typename T> +struct foo {}; + +Q_DECLARE_METATYPE(foo<int>) + +int bar(foo<int>); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30122-sp_after_angle.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30122-sp_after_angle.cpp new file mode 100644 index 00000000..ee7acae0 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30122-sp_after_angle.cpp @@ -0,0 +1,6 @@ +template < typename T> +struct foo {}; + +Q_DECLARE_METATYPE( foo < int> ) + +int bar( foo <int > ); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30123-sp_after_angle.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30123-sp_after_angle.cpp new file mode 100644 index 00000000..a791a8ef --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30123-sp_after_angle.cpp @@ -0,0 +1,6 @@ +template < typename T> +struct foo {}; + +Q_DECLARE_METATYPE(foo < int>) + +int bar(foo <int >); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30124-sp_after_angle.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30124-sp_after_angle.cpp new file mode 100644 index 00000000..c29f3552 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30124-sp_after_angle.cpp @@ -0,0 +1,6 @@ +template < typename T> +struct foo {}; + +Q_DECLARE_METATYPE(foo < int> ) + +int bar(foo <int > ); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30125-sp_after_angle.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30125-sp_after_angle.cpp new file mode 100644 index 00000000..a791a8ef --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30125-sp_after_angle.cpp @@ -0,0 +1,6 @@ +template < typename T> +struct foo {}; + +Q_DECLARE_METATYPE(foo < int>) + +int bar(foo <int >); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30126-sp_after_angle.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30126-sp_after_angle.cpp new file mode 100644 index 00000000..18788919 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30126-sp_after_angle.cpp @@ -0,0 +1,6 @@ +template < typename T> +struct foo {}; + +Q_DECLARE_METATYPE(foo < int> ) + +int bar(foo <int > ); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30127-Issue_2565.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30127-Issue_2565.cpp new file mode 100644 index 00000000..721d4d78 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30127-Issue_2565.cpp @@ -0,0 +1,3 @@ +template +<bool = (sizeof(unsigned long) >= sizeof(size_t))> +struct LongFitsIntoSizeTMinusOne { ... } diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30128-Issue_2873.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30128-Issue_2873.cpp new file mode 100644 index 00000000..6803fd9a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30128-Issue_2873.cpp @@ -0,0 +1,16 @@ +class Capteur_CO2 + : public Capteur, aabc, def +{ +public: + Capteur_CO2() + : un ( 1 ), deux(2) { + } +}; +class Capteur_CO3 + : public Capteur,aabc,def +{ +public: + Capteur_CO3() + : un ( 1 ),deux(2) { + } +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30129-Issue_2890.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30129-Issue_2890.cpp new file mode 100644 index 00000000..d03e4f62 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30129-Issue_2890.cpp @@ -0,0 +1,54 @@ +#include <iostream> +#include <sstream> +#include <string> + +struct StringBuilder +{ + template <typename T> + StringBuilder& append(const T& thing) + { + ss << thing; + return *this; + } + std::string build() + { + return ss + .str(); + } + std::stringstream ss; +}; + +int main() +{ + std::string my_____String = StringBuilder() + .append(7) + .append(" + ") + .append(21) + .append(" = ") + .append(7 + 21) + .build(); + std::string my_____String = StringBuilder() + .append(7) + .append(" + ") + .append(21) + .append(" = ") + .append(7 + 21) + .build(); + + std::cout << my___String << std::endl; +} + +void function() +{ + auto response = ResponseBuilder_1(1) + .setStatus_1(status) + .finish_1(); + + ResponseBuilder_2(request) + .setStatus_2(status) + .finish_2(); + + return ResponseBuilder_3(request) + .setStatus_3(status) + .finish_3(); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30130-if-constexpr.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30130-if-constexpr.cpp new file mode 100644 index 00000000..483317be --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30130-if-constexpr.cpp @@ -0,0 +1,8 @@ +int foo() +{ + if constexpr (a == 0) + { + return 1; + } + return 0; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30131-Issue_3010.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30131-Issue_3010.cpp new file mode 100644 index 00000000..93fd70db --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30131-Issue_3010.cpp @@ -0,0 +1,16 @@ +namespace SomeLongNamespaceName { +class Foo { }; +} + +class Bar : SomeLongNamespaceName::Foo { +public: +Bar() + : SomeLongNamespaceName::Foo(), + myNumber(3), // <-- this line + myOtherNumber(5) +{ +} +private: +int myNumber; +int myOtherNumber; +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30132-sp_brace_catch.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30132-sp_brace_catch.cpp new file mode 100644 index 00000000..04c1b9c1 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30132-sp_brace_catch.cpp @@ -0,0 +1,8 @@ +int foo() +{ + try { foo(bar); }catch (int *e) { return 0; } + + if (false) try { throw int(); }catch(...) {} + + return 1; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30133-Issue_3252.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30133-Issue_3252.cpp new file mode 100644 index 00000000..5dc0e67e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30133-Issue_3252.cpp @@ -0,0 +1,6 @@ +void (*x) (void); + +typedef struct +{ + void (*y) (void); +} z; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30134-Issue_3357.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30134-Issue_3357.cpp new file mode 100644 index 00000000..83dcc29a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30134-Issue_3357.cpp @@ -0,0 +1,7 @@ +/** + * @param[out] dest The memory area to copy to. + * @param[in] src The memory area to copy from. + * @param[in] n The number of bytes to copy + * @param[in,out] t The Test + */ +void memcpy(void *dest, const void *src, size_t n); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30135-Issue_3448.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30135-Issue_3448.cpp new file mode 100644 index 00000000..19160cf9 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30135-Issue_3448.cpp @@ -0,0 +1,11 @@ +class Foo +: public Bar +, private Blarg +, private Baz +{ + Foo() + : first() + , second() + , third() + { } +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30136-Issue_3413.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30136-Issue_3413.cpp new file mode 100644 index 00000000..d465f531 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30136-Issue_3413.cpp @@ -0,0 +1,10 @@ +namespace +{ +struct S { void f() {} }; +} + +void FuncCrash(int a = {}) { } +void FuncCrash(int b = int {}) { } +void FuncCrash(int b = int(0)) { } +void FuncCrash(int b = double{0}) { } +void FuncCrash(int b = 0) { } diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30137-Issue_3513-0.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30137-Issue_3513-0.cpp new file mode 100644 index 00000000..c55df54a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30137-Issue_3513-0.cpp @@ -0,0 +1,8 @@ +struct S +{ + operator int() const + { + return get(); + } + +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30138-Issue_3513-1.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30138-Issue_3513-1.cpp new file mode 100644 index 00000000..560e6d51 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30138-Issue_3513-1.cpp @@ -0,0 +1,8 @@ +struct S +{ + operator int() + { + return get(); + } + +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30139-Issue_3604.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30139-Issue_3604.cpp new file mode 100644 index 00000000..a96b3437 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30139-Issue_3604.cpp @@ -0,0 +1,4 @@ +#define MY_DEF(Type, ...) \ + enum Type { \ + __VA_ARGS__, \ + }; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30140-Issue_3785.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30140-Issue_3785.cpp new file mode 100644 index 00000000..94988dd6 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30140-Issue_3785.cpp @@ -0,0 +1,24 @@ +void output_text(FILE *pfile) +{ + for (pc = Chunk::GetHead(); pc->IsNotNullChunk(); pc = pc->GetNext()) + { + if (pc->GetTrackingData() != nullptr) + { + if (many > 1) + { + } +#define \ + EXTRA_LOG_2 + char *old_one = nullptr; + } + } +} // output_text + + +void dump_step(const char *filename, const char *step_description) +{ + static int file_num = 0; + char buffer[256]; + FILE *dump_file; + fclose(dump_file); +} // dump_step diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30200-bug_1862.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30200-bug_1862.cpp new file mode 100644 index 00000000..c5357c86 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30200-bug_1862.cpp @@ -0,0 +1,11 @@ +#if _MSC_VER < 1300 +#define __func__ "???" +#else/* comment 1 */ +#define __func__ __FUNCTION__ +#endif/* comment 2 */ + +#if _MSC_VER < 1300 +#define __func__ "???" +#else// comment 1 +#define __func__ __FUNCTION__ +#endif// comment 2 diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30201-cmt_indent.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30201-cmt_indent.cpp new file mode 100644 index 00000000..ed27ffca --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30201-cmt_indent.cpp @@ -0,0 +1,32 @@ +namespace { + + /* If we're in the middle of the original line, copy the string + only up to the cursor position into buf, so tab completion + will result in buf's containing only the tab-completed + path/filename. */ + + class Test { + + Test() {} + ~Test() {} + + /** Call this method to + run the test + + \param n test number + \returns the test result + */ + bool Run(int n); + + /** Call this method to + stop the test + + \param n test number + \returns the test result + */ + bool Run(int n); + + }; + +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30202-cmt_indent.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30202-cmt_indent.cpp new file mode 100644 index 00000000..95c47d6e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30202-cmt_indent.cpp @@ -0,0 +1,32 @@ +namespace { + + /* If we're in the middle of the original line, copy the string + only up to the cursor position into buf, so tab completion + will result in buf's containing only the tab-completed + path/filename. */ + + class Test { + + Test() {} + ~Test() {} + + /** Call this method to + run the test + + \param n test number + \returns the test result + */ + bool Run(int n); + + /** Call this method to + stop the test + + \param n test number + \returns the test result + */ + bool Run(int n); + + }; + +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30203-cmt_indent.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30203-cmt_indent.cpp new file mode 100644 index 00000000..05cc2df3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30203-cmt_indent.cpp @@ -0,0 +1,32 @@ +namespace { + + /* If we're in the middle of the original line, copy the string + * only up to the cursor position into buf, so tab completion + * will result in buf's containing only the tab-completed + * path/filename. */ + + class Test { + + Test() {} + ~Test() {} + + /** Call this method to + * run the test + * + * \param n test number + * \returns the test result + */ + bool Run(int n); + + /** Call this method to + * stop the test + * + * \param n test number + * \returns the test result + */ + bool Run(int n); + + }; + +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30204-comment-align.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30204-comment-align.cpp new file mode 100644 index 00000000..afaaafef --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30204-comment-align.cpp @@ -0,0 +1,34 @@ +template <class T> +inline void +x3(T & a, T & b, T & c) +{ + T temp; + if (b < a) + { + if (c < a) + { // b , c < a + if (b < c) + { // b < c < a + temp = a; + a = b; + b = c; + c = temp; + } + else + { // c <=b < a + std::swap(c, a); + } + } + else + { // b < a <=c + // second line of comment + std::swap(a, b); + } + } + 0; + 0; + 0; + if (1) // always + do_something(); +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30205-cmt_right.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30205-cmt_right.cpp new file mode 100644 index 00000000..bcca4e2e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30205-cmt_right.cpp @@ -0,0 +1,28 @@ +class X +{ +struct Zone +{ + // int a; + // int b; + int c; + int d; + double e; + inline Zone(int _c) : c(_c) + { + } // constructor for zone search + + inline Zone( + //int _a, + //int _b, + int _c, + int _d, double _e) : + //a(_a), + //b(_b), + c(_c), + d(_d), + e(_e) + { + } +}; +}; + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30206-cmt_backslash_eol.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30206-cmt_backslash_eol.cpp new file mode 100644 index 00000000..d020e171 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30206-cmt_backslash_eol.cpp @@ -0,0 +1,4 @@ +foo(); +// test \ +// blah(); +bar(); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30207-cmt_indent_pp.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30207-cmt_indent_pp.h new file mode 100644 index 00000000..50e35c8d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30207-cmt_indent_pp.h @@ -0,0 +1,8 @@ +class MyClass : public BaseClass +{ + //@{ BaseClass interface +#if VERY_LONG_AND_COMPLICATED_DEFINE + void foo(); +#endif // VERY_LONG_AND_COMPLICATED_DEFINE + //@} +};
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30208-bug_1108.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30208-bug_1108.cpp new file mode 100644 index 00000000..573a9810 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30208-bug_1108.cpp @@ -0,0 +1,8 @@ +int foo() + { + const std::map<std::string, int> bar = + { + { "abcXYZ", -13 }, + }; + return 5; + } diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30209-bug_1134.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30209-bug_1134.cpp new file mode 100644 index 00000000..369b70f1 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30209-bug_1134.cpp @@ -0,0 +1,2 @@ +#define ABC 123 // Start trailing comment.. + // ..end with aligned comment. diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30210-bug_1338.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30210-bug_1338.cpp new file mode 100644 index 00000000..04b4cd8a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30210-bug_1338.cpp @@ -0,0 +1,6 @@ +/* *INDENT-OFF* */ +printf("Hello World!\n"); + + +//test +/* *INDENT-ON* */ diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30211-indent_comment_align_thresh.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30211-indent_comment_align_thresh.cpp new file mode 100644 index 00000000..34c09203 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30211-indent_comment_align_thresh.cpp @@ -0,0 +1,153 @@ +// First comment +// Second comment + +// First comment +// Second comment + +// Issue #1134 +class MyClass : public BaseClass +{ + //@{ BaseClass interface +#if VERY_LONG_AND_COMPLICATED_DEFINE + void foo(); +#endif // VERY_LONG_AND_COMPLICATED_DEFINE + //@} +}; + +// Issue #1287 +void foo() +{ +#if defined(SUPPORT_FEATURE) + bar(); +#endif // SUPPORT_FEATURE + // Handle error + if (error != 0) + { + } + +#if defined(SUPPORT_FEATURE) + bar(); +#endif // SUPPORT_FEATURE + // Handle error + // Handle error + if (error != 0) + { + } + +# if defined(SUPPORT_FEATURE) + bar(); +# endif // SUPPORT_FEATURE + // SUPPORT_FEATURE + // Handle error + // Handle error + if (error != 0) + { + } + +# if defined(SUPPORT_FEATURE) + bar(); +# endif // SUPPORT_FEATURE + // SUPPORT_FEATURE + // Handle error + // Handle error + if (error != 0) + { + } + + #if defined(SUPPORT_FEATURE) + bar(); + #endif /* SUPPORT_FEATURE + SUPPORT_FEATURE */ + // Handle error + // Handle error + if (error != 0) + { + } +} + +// ----- Some namespace scope -------------------------------------------------- +// ----- FooNamespace scope ---------------------------------------------------- +namespace FooNamespace +{ +// ----- Some classes scope ---------------------------------------------------- +// ----- FooClass scope -------------------------------------------------------- +class FooClass +{ + using FooUsing = FooTemplate< + param1, + param2 + >; // FooTemplate + // Foo description + void foo() + { + if (a == b) + { +// Col1 comment +// Col1 comment +// Col1 comment + // Baz description + baz(); // Baz trailing comment begin + // Baz trailing comment ... + // Baz trailing comment end + } // if (a == b) + // Bar description begin + // Bar description ... + // Bar description end + bar( + a, + b + ); // bar trailing comment begin + // bar trailing comment ... + // Baz trailing comment end + /*! Baz description begin + * Baz description ... + * Baz description end */ + baz(a, + b); /* Baz trailing comment begin + Baz trailing comment ... + Baz trailing comment end */ + // Bar description + bar(); // bar trailing comment begin + // bar trailing comment ... + // Baz trailing comment end + + // Baz description + baz(); + } + void bar(); + // Many methods + void baz(); +}; // FooClass +// ----- FooClass scope -------------------------------------------------------- + +// Many classes +// Many classes +// Many classes + +class BazClass +{ + void foo(); + +// Many methods +// Many methods +// Many methods + +// Overrides +// Overrides +//Overrides +protected: + // Bar description + void baz(); + //Overrides +}; // BazClass trailing comment begin + // BazClass trailing comment ... + // BazClass trailing comment end +// ----- Some classes scope ---------------------------------------------------- +} // FooNamespace trailing comment begin + // FooNamespace trailing comment end +// ----- FooNamespace scope ---------------------------------------------------- +// BarNamespace description +namespace BarNamespace +{ +} // namespace BarNamespace +// ----- Some namespace scope -------------------------------------------------- diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30212-indent_comment_align_thresh.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30212-indent_comment_align_thresh.cpp new file mode 100644 index 00000000..f9316598 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30212-indent_comment_align_thresh.cpp @@ -0,0 +1,153 @@ +// First comment +// Second comment + +// First comment +// Second comment + +// Issue #1134 +class MyClass : public BaseClass +{ + //@{ BaseClass interface +#if VERY_LONG_AND_COMPLICATED_DEFINE + void foo(); +#endif // VERY_LONG_AND_COMPLICATED_DEFINE + //@} +}; + +// Issue #1287 +void foo() +{ +#if defined(SUPPORT_FEATURE) + bar(); +#endif // SUPPORT_FEATURE + // Handle error + if (error != 0) + { + } + +#if defined(SUPPORT_FEATURE) + bar(); +#endif // SUPPORT_FEATURE + // Handle error + // Handle error + if (error != 0) + { + } + +# if defined(SUPPORT_FEATURE) + bar(); +# endif // SUPPORT_FEATURE + // SUPPORT_FEATURE + // Handle error + // Handle error + if (error != 0) + { + } + +# if defined(SUPPORT_FEATURE) + bar(); +# endif // SUPPORT_FEATURE + // SUPPORT_FEATURE + // Handle error + // Handle error + if (error != 0) + { + } + + #if defined(SUPPORT_FEATURE) + bar(); + #endif /* SUPPORT_FEATURE + SUPPORT_FEATURE */ + // Handle error + // Handle error + if (error != 0) + { + } +} + +// ----- Some namespace scope -------------------------------------------------- +// ----- FooNamespace scope ---------------------------------------------------- +namespace FooNamespace +{ +// ----- Some classes scope ---------------------------------------------------- +// ----- FooClass scope -------------------------------------------------------- +class FooClass +{ + using FooUsing = FooTemplate< + param1, + param2 + >; // FooTemplate + // Foo description + void foo() + { + if (a == b) + { + // Col1 comment + // Col1 comment + // Col1 comment + // Baz description + baz(); // Baz trailing comment begin + // Baz trailing comment ... + // Baz trailing comment end + } // if (a == b) + // Bar description begin + // Bar description ... + // Bar description end + bar( + a, + b + ); // bar trailing comment begin + // bar trailing comment ... + // Baz trailing comment end + /*! Baz description begin + * Baz description ... + * Baz description end */ + baz(a, + b); /* Baz trailing comment begin + Baz trailing comment ... + Baz trailing comment end */ + // Bar description + bar(); // bar trailing comment begin + // bar trailing comment ... + // Baz trailing comment end + + // Baz description + baz(); + } + void bar(); + // Many methods + void baz(); +}; // FooClass +// ----- FooClass scope -------------------------------------------------------- + +// Many classes +// Many classes +// Many classes + +class BazClass +{ + void foo(); + + // Many methods + // Many methods + // Many methods + + // Overrides + // Overrides + //Overrides +protected: + // Bar description + void baz(); + //Overrides +}; // BazClass trailing comment begin + // BazClass trailing comment ... + // BazClass trailing comment end +// ----- Some classes scope ---------------------------------------------------- +} // FooNamespace trailing comment begin + // FooNamespace trailing comment end +// ----- FooNamespace scope ---------------------------------------------------- +// BarNamespace description +namespace BarNamespace +{ +} // namespace BarNamespace +// ----- Some namespace scope -------------------------------------------------- diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30213-align_right_comment.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30213-align_right_comment.cpp new file mode 100644 index 00000000..43a2a70f --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30213-align_right_comment.cpp @@ -0,0 +1,29 @@ +namespace A +{ +namespace B +{ +namespace C +{ + + +struct D +{ + int a; // a. + int b; + int c; +}; // struct D + + +} // namespace C + + +struct E {}; + + +} // namespace B + + +struct F {}; + + +} // namespace C diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30214-align_across_braces.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30214-align_across_braces.cpp new file mode 100644 index 00000000..199ede8d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30214-align_across_braces.cpp @@ -0,0 +1,7 @@ +enum foo // comment +{ + long_enum_value, // these comments should be aligned + another_value, // with each other, but not + shorter, // with the first line +}; // this comment should start a new group +void bar(); // this one should align with the previous line diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30215-Issue_2099.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30215-Issue_2099.cpp new file mode 100644 index 00000000..4726f44b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30215-Issue_2099.cpp @@ -0,0 +1,2 @@ +void GoAbsolutePosition( /* [in1] */ double arg1_, + /* [in2] */ double arg2_ ); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30216-Issue_2302.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30216-Issue_2302.cpp new file mode 100644 index 00000000..e2684ae6 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30216-Issue_2302.cpp @@ -0,0 +1,7 @@ +template<class T> +class Foo<T>::Baz { +Baz() noexcept + : i(0) +{ +} +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30217-2138.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30217-2138.cpp new file mode 100644 index 00000000..8d1d7462 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30217-2138.cpp @@ -0,0 +1 @@ +int i = 0; /* a b *//* a b */ int b = 0; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30218-Issue_3710.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30218-Issue_3710.cpp new file mode 100644 index 00000000..b8e5b421 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30218-Issue_3710.cpp @@ -0,0 +1,4 @@ +void foo() +{ + PyErr_SetString( PyExc_KeyError, sstr.str().c_str() ); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30220-bug_1340.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30220-bug_1340.cpp new file mode 100644 index 00000000..f64bc6a0 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30220-bug_1340.cpp @@ -0,0 +1,20 @@ +double t = 111; +double t1 = 222; +double t123 = 333; + + +auto f = [](double x) -> double + { + double t = 1111; + double t1 = 1222; + double t123 = 1333; + }; + + +std::transform(v1.begin(), v1.end(), v2.begin(), + [](double x) -> double + { + double t = 2111; + double t1 = 2222; + double t123 = 2333; + }; ); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30221-Issue_2914.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30221-Issue_2914.cpp new file mode 100644 index 00000000..c2cd8b59 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30221-Issue_2914.cpp @@ -0,0 +1,6 @@ +void f() +{ + CallFunction( //-V556: Warning disabled because blablabla + param1, + param2 ); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30223-sp_enum_colon.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30223-sp_enum_colon.cpp new file mode 100644 index 00000000..11d7320b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30223-sp_enum_colon.cpp @@ -0,0 +1,10 @@ +enum Enum1 : int { + E31=0, + E32=1, + E33=2 +}; +enum Enum2 : int { + E31=0, + E32=1, + E33=2 +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30224-sp_enum_colon.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30224-sp_enum_colon.cpp new file mode 100644 index 00000000..804fe1ae --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30224-sp_enum_colon.cpp @@ -0,0 +1,10 @@ +enum Enum1:int { + E31=0, + E32=1, + E33=2 +}; +enum Enum2:int { + E31=0, + E32=1, + E33=2 +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30225-Issue_3176.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30225-Issue_3176.cpp new file mode 100644 index 00000000..2384027d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30225-Issue_3176.cpp @@ -0,0 +1 @@ +SecureStorage::~SecureStorage() = default; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30226-sp_enum_colon.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30226-sp_enum_colon.cpp new file mode 100644 index 00000000..be23e687 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30226-sp_enum_colon.cpp @@ -0,0 +1,10 @@ +enum Enum1:int { + E31=0, + E32=1, + E33=2 +}; +enum Enum2 : int { + E31=0, + E32=1, + E33=2 +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30227-sp_inside_braces_enum.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30227-sp_inside_braces_enum.cpp new file mode 100644 index 00000000..8386e215 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30227-sp_inside_braces_enum.cpp @@ -0,0 +1 @@ +enum { IDD = IDD_ATCS_MGR_DLG }; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30228-sp_inside_braces_enum.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30228-sp_inside_braces_enum.cpp new file mode 100644 index 00000000..666f834c --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30228-sp_inside_braces_enum.cpp @@ -0,0 +1 @@ +enum { IDD = IDD_ATCS_MGR_DLG }; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30229-sp_inside_braces_enum.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30229-sp_inside_braces_enum.cpp new file mode 100644 index 00000000..98640667 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30229-sp_inside_braces_enum.cpp @@ -0,0 +1 @@ +enum {IDD = IDD_ATCS_MGR_DLG}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30230-sp_type_func.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30230-sp_type_func.cpp new file mode 100644 index 00000000..0d17364f --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30230-sp_type_func.cpp @@ -0,0 +1,11 @@ +int foo1() +{ +} + +int*foo2() +{ +} + +int&foo3() +{ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30231-sp_type_func.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30231-sp_type_func.cpp new file mode 100644 index 00000000..d7d69cc8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30231-sp_type_func.cpp @@ -0,0 +1,11 @@ +int foo1() +{ +} + +int* foo2() +{ +} + +int& foo3() +{ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30232-sp_type_func.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30232-sp_type_func.cpp new file mode 100644 index 00000000..fe2a3348 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30232-sp_type_func.cpp @@ -0,0 +1,11 @@ +int foo1() +{ +} + +int* foo2() +{ +} + +int& foo3() +{ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30233-sp_type_func.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30233-sp_type_func.cpp new file mode 100644 index 00000000..fe2a3348 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30233-sp_type_func.cpp @@ -0,0 +1,11 @@ +int foo1() +{ +} + +int* foo2() +{ +} + +int& foo3() +{ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30234-functype_param.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30234-functype_param.cpp new file mode 100644 index 00000000..32419616 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30234-functype_param.cpp @@ -0,0 +1,2 @@ +void foo(int *(*f)(int)); +void foo(int &(*f)(int)); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30235-functype_param.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30235-functype_param.cpp new file mode 100644 index 00000000..9e9f5ecc --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30235-functype_param.cpp @@ -0,0 +1,2 @@ +void foo(int * (*f)(int)); +void foo(int & (*f)(int)); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30236-Issue_750.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30236-Issue_750.cpp new file mode 100644 index 00000000..bf7d1100 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30236-Issue_750.cpp @@ -0,0 +1,15 @@ +class Greeks +{ + double _dRho = 111.0; + int _dTheoretical = 22222.0; + double _dTheta = 3333333.0; + double _dTimeValue = 0.0; + double _dVega { 0.0 }; + double _dVolatility { 0.0 }; + double _dPvDiv = 0.0; +} + +double sdf[6] = { 5.0, 6, 6, 34, 324, 5 }; +int fsaf[6] = { 5, 6, 6, 34, 324, 5 }; +char msa[3] { 6, 5, 3 }; +int y[3] { 6, 5, 3 }; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30240-align_func_params.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30240-align_func_params.cpp new file mode 100644 index 00000000..923d274b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30240-align_func_params.cpp @@ -0,0 +1,111 @@ +class SomeClass +{ +public: +// Short parameters +TYPE_EXPORT method1(int a, + float b); + +TYPE_EXPORT method2(int& d, + float e); + +TYPE_EXPORT method3(int* f, + float g); + +// Parameters with '&' and '*' +TYPE_EXPORT method4(int a); +TYPE_EXPORT method5(int & a); +TYPE_EXPORT method6(int * a); + +TYPE_EXPORT method7(float a); +TYPE_EXPORT method8(float & a); +TYPE_EXPORT method9(float * a); + +// Single short and long parameters +void method10(int a); +void method11(float & a); +void method12(SomeLongNamespace::SomeLongType long_parameter_name); +void method13(double * a); +void method14(SomeLongType long_parameter_name); + +// Long parameters +void method20(int * int_param, + SomeLongNamespace::SomeLongType long_parameter_name, + float & float_param); + +// Possible bug: different aligning in method21 and method22 +// align_func_params_span = 1, align_func_params_thresh = 8 +void method21(SomeLoooooooooooooongType long_param_1, + const string& string_param_1, + const TimePoint& time_param, + double double_param_1, + double double_param_2, + const string& string_param_2, + SomeLoooooooooooooongType long_param_2 ); +void method22(SomeLoooooooooooooongType long_param_1, + const string& string_param_1, + double double_param_1, + double double_param_2, + const TimePoint& time_param, + const string& string_param_2, + SomeLoooooooooooooongType long_param_2 ); + +void method23(int int_param, + int * int_ptr_param, + float float_param, + float & float_ref_param, + SomeLongNamespace::SomeLongType long_parameter_name, + int * other_int_param, + SomeLooooongType long_parameter_name, + SomeLoooooooooongType looong_parameter_name, + SomeLongNamespace::OtherLongNamespace::SomeLongType very_long_parameter_name, + int * int_ptr_param, + float float_param, + float & float_ref_param, + double & double_param, + SomeLongNamespace::SomeLongType long_parameter_name, + int * other_int_param); + +// Don't align several parameters in one line +void method30(int* f, char foo, + float g); + +// Short parameters in method definition +void method40(int a, + float b) +{ + int c; + + if ( true ) callProc; + // do stuff. +} + +// Long parameters in method definition +void method50(int int_param, + SomeLongNamespace::OtherLongNamespace::SomeLongType long_parameter_name, + float float_param, + double double_param, + const string & string_param) +{ + doSomething(); +} + +void method51( + int int_param, + SomeLongNamespace::OtherLongNamespace::SomeLongType long_parameter_name, + float float_param, + double double_param, + const string & string_param) +{ + doSomething(); +} +void increasing_length( + int int_param, + float float_param, + double double_param, + ah_long_t & string_param, + very_long_type t_param, + even_longer_type l_param) +{ + doSomething(); +} +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30241-align_func_params.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30241-align_func_params.cpp new file mode 100644 index 00000000..923d274b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30241-align_func_params.cpp @@ -0,0 +1,111 @@ +class SomeClass +{ +public: +// Short parameters +TYPE_EXPORT method1(int a, + float b); + +TYPE_EXPORT method2(int& d, + float e); + +TYPE_EXPORT method3(int* f, + float g); + +// Parameters with '&' and '*' +TYPE_EXPORT method4(int a); +TYPE_EXPORT method5(int & a); +TYPE_EXPORT method6(int * a); + +TYPE_EXPORT method7(float a); +TYPE_EXPORT method8(float & a); +TYPE_EXPORT method9(float * a); + +// Single short and long parameters +void method10(int a); +void method11(float & a); +void method12(SomeLongNamespace::SomeLongType long_parameter_name); +void method13(double * a); +void method14(SomeLongType long_parameter_name); + +// Long parameters +void method20(int * int_param, + SomeLongNamespace::SomeLongType long_parameter_name, + float & float_param); + +// Possible bug: different aligning in method21 and method22 +// align_func_params_span = 1, align_func_params_thresh = 8 +void method21(SomeLoooooooooooooongType long_param_1, + const string& string_param_1, + const TimePoint& time_param, + double double_param_1, + double double_param_2, + const string& string_param_2, + SomeLoooooooooooooongType long_param_2 ); +void method22(SomeLoooooooooooooongType long_param_1, + const string& string_param_1, + double double_param_1, + double double_param_2, + const TimePoint& time_param, + const string& string_param_2, + SomeLoooooooooooooongType long_param_2 ); + +void method23(int int_param, + int * int_ptr_param, + float float_param, + float & float_ref_param, + SomeLongNamespace::SomeLongType long_parameter_name, + int * other_int_param, + SomeLooooongType long_parameter_name, + SomeLoooooooooongType looong_parameter_name, + SomeLongNamespace::OtherLongNamespace::SomeLongType very_long_parameter_name, + int * int_ptr_param, + float float_param, + float & float_ref_param, + double & double_param, + SomeLongNamespace::SomeLongType long_parameter_name, + int * other_int_param); + +// Don't align several parameters in one line +void method30(int* f, char foo, + float g); + +// Short parameters in method definition +void method40(int a, + float b) +{ + int c; + + if ( true ) callProc; + // do stuff. +} + +// Long parameters in method definition +void method50(int int_param, + SomeLongNamespace::OtherLongNamespace::SomeLongType long_parameter_name, + float float_param, + double double_param, + const string & string_param) +{ + doSomething(); +} + +void method51( + int int_param, + SomeLongNamespace::OtherLongNamespace::SomeLongType long_parameter_name, + float float_param, + double double_param, + const string & string_param) +{ + doSomething(); +} +void increasing_length( + int int_param, + float float_param, + double double_param, + ah_long_t & string_param, + very_long_type t_param, + even_longer_type l_param) +{ + doSomething(); +} +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30242-align_func_params.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30242-align_func_params.cpp new file mode 100644 index 00000000..512233cd --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30242-align_func_params.cpp @@ -0,0 +1,111 @@ +class SomeClass +{ +public: +// Short parameters +TYPE_EXPORT method1(int a, + float b); + +TYPE_EXPORT method2(int& d, + float e); + +TYPE_EXPORT method3(int* f, + float g); + +// Parameters with '&' and '*' +TYPE_EXPORT method4(int a); +TYPE_EXPORT method5(int & a); +TYPE_EXPORT method6(int * a); + +TYPE_EXPORT method7(float a); +TYPE_EXPORT method8(float & a); +TYPE_EXPORT method9(float * a); + +// Single short and long parameters +void method10(int a); +void method11(float & a); +void method12(SomeLongNamespace::SomeLongType long_parameter_name); +void method13(double * a); +void method14(SomeLongType long_parameter_name); + +// Long parameters +void method20(int * int_param, + SomeLongNamespace::SomeLongType long_parameter_name, + float & float_param); + +// Possible bug: different aligning in method21 and method22 +// align_func_params_span = 1, align_func_params_thresh = 8 +void method21(SomeLoooooooooooooongType long_param_1, + const string& string_param_1, + const TimePoint& time_param, + double double_param_1, + double double_param_2, + const string& string_param_2, + SomeLoooooooooooooongType long_param_2 ); +void method22(SomeLoooooooooooooongType long_param_1, + const string& string_param_1, + double double_param_1, + double double_param_2, + const TimePoint& time_param, + const string& string_param_2, + SomeLoooooooooooooongType long_param_2 ); + +void method23(int int_param, + int * int_ptr_param, + float float_param, + float & float_ref_param, + SomeLongNamespace::SomeLongType long_parameter_name, + int * other_int_param, + SomeLooooongType long_parameter_name, + SomeLoooooooooongType looong_parameter_name, + SomeLongNamespace::OtherLongNamespace::SomeLongType very_long_parameter_name, + int * int_ptr_param, + float float_param, + float & float_ref_param, + double & double_param, + SomeLongNamespace::SomeLongType long_parameter_name, + int * other_int_param); + +// Don't align several parameters in one line +void method30(int* f, char foo, + float g); + +// Short parameters in method definition +void method40(int a, + float b) +{ + int c; + + if ( true ) callProc; + // do stuff. +} + +// Long parameters in method definition +void method50(int int_param, + SomeLongNamespace::OtherLongNamespace::SomeLongType long_parameter_name, + float float_param, + double double_param, + const string & string_param) +{ + doSomething(); +} + +void method51( + int int_param, + SomeLongNamespace::OtherLongNamespace::SomeLongType long_parameter_name, + float float_param, + double double_param, + const string & string_param) +{ + doSomething(); +} +void increasing_length( + int int_param, + float float_param, + double double_param, + ah_long_t & string_param, + very_long_type t_param, + even_longer_type l_param) +{ + doSomething(); +} +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30243-align_func_params.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30243-align_func_params.cpp new file mode 100644 index 00000000..82434066 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30243-align_func_params.cpp @@ -0,0 +1,111 @@ +class SomeClass +{ +public: +// Short parameters +TYPE_EXPORT method1(int a, + float b); + +TYPE_EXPORT method2(int& d, + float e); + +TYPE_EXPORT method3(int* f, + float g); + +// Parameters with '&' and '*' +TYPE_EXPORT method4(int a); +TYPE_EXPORT method5(int & a); +TYPE_EXPORT method6(int * a); + +TYPE_EXPORT method7(float a); +TYPE_EXPORT method8(float & a); +TYPE_EXPORT method9(float * a); + +// Single short and long parameters +void method10(int a); +void method11(float & a); +void method12(SomeLongNamespace::SomeLongType long_parameter_name); +void method13(double * a); +void method14(SomeLongType long_parameter_name); + +// Long parameters +void method20(int * int_param, + SomeLongNamespace::SomeLongType long_parameter_name, + float & float_param); + +// Possible bug: different aligning in method21 and method22 +// align_func_params_span = 1, align_func_params_thresh = 8 +void method21(SomeLoooooooooooooongType long_param_1, + const string& string_param_1, + const TimePoint& time_param, + double double_param_1, + double double_param_2, + const string& string_param_2, + SomeLoooooooooooooongType long_param_2 ); +void method22(SomeLoooooooooooooongType long_param_1, + const string& string_param_1, + double double_param_1, + double double_param_2, + const TimePoint& time_param, + const string& string_param_2, + SomeLoooooooooooooongType long_param_2 ); + +void method23(int int_param, + int * int_ptr_param, + float float_param, + float & float_ref_param, + SomeLongNamespace::SomeLongType long_parameter_name, + int * other_int_param, + SomeLooooongType long_parameter_name, + SomeLoooooooooongType looong_parameter_name, + SomeLongNamespace::OtherLongNamespace::SomeLongType very_long_parameter_name, + int * int_ptr_param, + float float_param, + float & float_ref_param, + double & double_param, + SomeLongNamespace::SomeLongType long_parameter_name, + int * other_int_param); + +// Don't align several parameters in one line +void method30(int* f, char foo, + float g); + +// Short parameters in method definition +void method40(int a, + float b) +{ + int c; + + if ( true ) callProc; + // do stuff. +} + +// Long parameters in method definition +void method50(int int_param, + SomeLongNamespace::OtherLongNamespace::SomeLongType long_parameter_name, + float float_param, + double double_param, + const string & string_param) +{ + doSomething(); +} + +void method51( + int int_param, + SomeLongNamespace::OtherLongNamespace::SomeLongType long_parameter_name, + float float_param, + double double_param, + const string & string_param) +{ + doSomething(); +} +void increasing_length( + int int_param, + float float_param, + double double_param, + ah_long_t & string_param, + very_long_type t_param, + even_longer_type l_param) +{ + doSomething(); +} +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30244-align_func_params.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30244-align_func_params.cpp new file mode 100644 index 00000000..5efed666 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30244-align_func_params.cpp @@ -0,0 +1,111 @@ +class SomeClass +{ +public: +// Short parameters +TYPE_EXPORT method1(int a, + float b); + +TYPE_EXPORT method2(int& d, + float e); + +TYPE_EXPORT method3(int* f, + float g); + +// Parameters with '&' and '*' +TYPE_EXPORT method4(int a); +TYPE_EXPORT method5(int & a); +TYPE_EXPORT method6(int * a); + +TYPE_EXPORT method7(float a); +TYPE_EXPORT method8(float & a); +TYPE_EXPORT method9(float * a); + +// Single short and long parameters +void method10(int a); +void method11(float & a); +void method12(SomeLongNamespace::SomeLongType long_parameter_name); +void method13(double * a); +void method14(SomeLongType long_parameter_name); + +// Long parameters +void method20(int * int_param, + SomeLongNamespace::SomeLongType long_parameter_name, + float & float_param); + +// Possible bug: different aligning in method21 and method22 +// align_func_params_span = 1, align_func_params_thresh = 8 +void method21(SomeLoooooooooooooongType long_param_1, + const string& string_param_1, + const TimePoint& time_param, + double double_param_1, + double double_param_2, + const string& string_param_2, + SomeLoooooooooooooongType long_param_2 ); +void method22(SomeLoooooooooooooongType long_param_1, + const string& string_param_1, + double double_param_1, + double double_param_2, + const TimePoint& time_param, + const string& string_param_2, + SomeLoooooooooooooongType long_param_2 ); + +void method23(int int_param, + int * int_ptr_param, + float float_param, + float & float_ref_param, + SomeLongNamespace::SomeLongType long_parameter_name, + int * other_int_param, + SomeLooooongType long_parameter_name, + SomeLoooooooooongType looong_parameter_name, + SomeLongNamespace::OtherLongNamespace::SomeLongType very_long_parameter_name, + int * int_ptr_param, + float float_param, + float & float_ref_param, + double & double_param, + SomeLongNamespace::SomeLongType long_parameter_name, + int * other_int_param); + +// Don't align several parameters in one line +void method30(int* f, char foo, + float g); + +// Short parameters in method definition +void method40(int a, + float b) +{ + int c; + + if ( true ) callProc; + // do stuff. +} + +// Long parameters in method definition +void method50(int int_param, + SomeLongNamespace::OtherLongNamespace::SomeLongType long_parameter_name, + float float_param, + double double_param, + const string & string_param) +{ + doSomething(); +} + +void method51( + int int_param, + SomeLongNamespace::OtherLongNamespace::SomeLongType long_parameter_name, + float float_param, + double double_param, + const string & string_param) +{ + doSomething(); +} +void increasing_length( + int int_param, + float float_param, + double double_param, + ah_long_t & string_param, + very_long_type t_param, + even_longer_type l_param) +{ + doSomething(); +} +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30245-align_func_params.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30245-align_func_params.cpp new file mode 100644 index 00000000..a44170a9 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30245-align_func_params.cpp @@ -0,0 +1,111 @@ +class SomeClass +{ +public: +// Short parameters +TYPE_EXPORT method1(int a, + float b); + +TYPE_EXPORT method2(int& d, + float e); + +TYPE_EXPORT method3(int* f, + float g); + +// Parameters with '&' and '*' +TYPE_EXPORT method4(int a); +TYPE_EXPORT method5(int & a); +TYPE_EXPORT method6(int * a); + +TYPE_EXPORT method7(float a); +TYPE_EXPORT method8(float & a); +TYPE_EXPORT method9(float * a); + +// Single short and long parameters +void method10(int a); +void method11(float & a); +void method12(SomeLongNamespace::SomeLongType long_parameter_name); +void method13(double * a); +void method14(SomeLongType long_parameter_name); + +// Long parameters +void method20(int * int_param, + SomeLongNamespace::SomeLongType long_parameter_name, + float & float_param); + +// Possible bug: different aligning in method21 and method22 +// align_func_params_span = 1, align_func_params_thresh = 8 +void method21(SomeLoooooooooooooongType long_param_1, + const string& string_param_1, + const TimePoint& time_param, + double double_param_1, + double double_param_2, + const string& string_param_2, + SomeLoooooooooooooongType long_param_2 ); +void method22(SomeLoooooooooooooongType long_param_1, + const string& string_param_1, + double double_param_1, + double double_param_2, + const TimePoint& time_param, + const string& string_param_2, + SomeLoooooooooooooongType long_param_2 ); + +void method23(int int_param, + int * int_ptr_param, + float float_param, + float & float_ref_param, + SomeLongNamespace::SomeLongType long_parameter_name, + int * other_int_param, + SomeLooooongType long_parameter_name, + SomeLoooooooooongType looong_parameter_name, + SomeLongNamespace::OtherLongNamespace::SomeLongType very_long_parameter_name, + int * int_ptr_param, + float float_param, + float & float_ref_param, + double & double_param, + SomeLongNamespace::SomeLongType long_parameter_name, + int * other_int_param); + +// Don't align several parameters in one line +void method30(int* f, char foo, + float g); + +// Short parameters in method definition +void method40(int a, + float b) +{ + int c; + + if ( true ) callProc; + // do stuff. +} + +// Long parameters in method definition +void method50(int int_param, + SomeLongNamespace::OtherLongNamespace::SomeLongType long_parameter_name, + float float_param, + double double_param, + const string & string_param) +{ + doSomething(); +} + +void method51( + int int_param, + SomeLongNamespace::OtherLongNamespace::SomeLongType long_parameter_name, + float float_param, + double double_param, + const string & string_param) +{ + doSomething(); +} +void increasing_length( + int int_param, + float float_param, + double double_param, + ah_long_t & string_param, + very_long_type t_param, + even_longer_type l_param) +{ + doSomething(); +} +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30246-align_func_params.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30246-align_func_params.cpp new file mode 100644 index 00000000..9def11e6 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30246-align_func_params.cpp @@ -0,0 +1,111 @@ +class SomeClass +{ +public: +// Short parameters +TYPE_EXPORT method1(int a, + float b); + +TYPE_EXPORT method2(int& d, + float e); + +TYPE_EXPORT method3(int* f, + float g); + +// Parameters with '&' and '*' +TYPE_EXPORT method4(int a); +TYPE_EXPORT method5(int & a); +TYPE_EXPORT method6(int * a); + +TYPE_EXPORT method7(float a); +TYPE_EXPORT method8(float & a); +TYPE_EXPORT method9(float * a); + +// Single short and long parameters +void method10(int a); +void method11(float & a); +void method12(SomeLongNamespace::SomeLongType long_parameter_name); +void method13(double * a); +void method14(SomeLongType long_parameter_name); + +// Long parameters +void method20(int * int_param, + SomeLongNamespace::SomeLongType long_parameter_name, + float & float_param); + +// Possible bug: different aligning in method21 and method22 +// align_func_params_span = 1, align_func_params_thresh = 8 +void method21(SomeLoooooooooooooongType long_param_1, + const string& string_param_1, + const TimePoint& time_param, + double double_param_1, + double double_param_2, + const string& string_param_2, + SomeLoooooooooooooongType long_param_2 ); +void method22(SomeLoooooooooooooongType long_param_1, + const string& string_param_1, + double double_param_1, + double double_param_2, + const TimePoint& time_param, + const string& string_param_2, + SomeLoooooooooooooongType long_param_2 ); + +void method23(int int_param, + int * int_ptr_param, + float float_param, + float & float_ref_param, + SomeLongNamespace::SomeLongType long_parameter_name, + int * other_int_param, + SomeLooooongType long_parameter_name, + SomeLoooooooooongType looong_parameter_name, + SomeLongNamespace::OtherLongNamespace::SomeLongType very_long_parameter_name, + int * int_ptr_param, + float float_param, + float & float_ref_param, + double & double_param, + SomeLongNamespace::SomeLongType long_parameter_name, + int * other_int_param); + +// Don't align several parameters in one line +void method30(int* f, char foo, + float g); + +// Short parameters in method definition +void method40(int a, + float b) +{ + int c; + + if ( true ) callProc; + // do stuff. +} + +// Long parameters in method definition +void method50(int int_param, + SomeLongNamespace::OtherLongNamespace::SomeLongType long_parameter_name, + float float_param, + double double_param, + const string & string_param) +{ + doSomething(); +} + +void method51( + int int_param, + SomeLongNamespace::OtherLongNamespace::SomeLongType long_parameter_name, + float float_param, + double double_param, + const string & string_param) +{ + doSomething(); +} +void increasing_length( + int int_param, + float float_param, + double double_param, + ah_long_t & string_param, + very_long_type t_param, + even_longer_type l_param) +{ + doSomething(); +} +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30247-Issue_2332.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30247-Issue_2332.cpp new file mode 100644 index 00000000..0bc9cf8f --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30247-Issue_2332.cpp @@ -0,0 +1,6 @@ +CPoint GetPoint() +{ + return { obj_.GetCoordinateXFromObject(), + obj_.GetCoordinateYFromObject(), + obj_.GetCoordinateZFromObject() }; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30248-Issue_2831.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30248-Issue_2831.cpp new file mode 100644 index 00000000..c099567a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30248-Issue_2831.cpp @@ -0,0 +1,8 @@ +class Test { +public: +void funca() +{ + static_cast<A>(funcb(static_cast<B>( + info))); +} +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30249-align-330.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30249-align-330.cpp new file mode 100644 index 00000000..a92e1545 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30249-align-330.cpp @@ -0,0 +1,7 @@ + \ + #define CTOR(i, _) : \ + T(X()), \ + y() \ + { + } + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30250-align_fcall.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30250-align_fcall.cpp new file mode 100644 index 00000000..055f0029 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30250-align_fcall.cpp @@ -0,0 +1,18 @@ +void foo() +{ + abc(1, 2, 3); + abc(10, 20, 30); + abc(100, 200, 300); + cab(3, 2, 1, 0); + brat("foo", 2000, 3000); + brat("question", 2, -42); + brat("a", -22, 1); + while (1) + { + brat("foo", 2000, 3000); + brat("question", 2, -42); + brat("a", -22, 1); + } + brat("foo", 2000, 3000); + brat("a", -22, 1); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30251-align_fcall.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30251-align_fcall.cpp new file mode 100644 index 00000000..055f0029 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30251-align_fcall.cpp @@ -0,0 +1,18 @@ +void foo() +{ + abc(1, 2, 3); + abc(10, 20, 30); + abc(100, 200, 300); + cab(3, 2, 1, 0); + brat("foo", 2000, 3000); + brat("question", 2, -42); + brat("a", -22, 1); + while (1) + { + brat("foo", 2000, 3000); + brat("question", 2, -42); + brat("a", -22, 1); + } + brat("foo", 2000, 3000); + brat("a", -22, 1); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30252-Issue_3691.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30252-Issue_3691.h new file mode 100644 index 00000000..fb1ec761 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30252-Issue_3691.h @@ -0,0 +1 @@ +void test(std::function<void(const int&)> func); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30253-align_left_shift.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30253-align_left_shift.cpp new file mode 100644 index 00000000..7c98226d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30253-align_left_shift.cpp @@ -0,0 +1,41 @@ +#include <iostream> +#define MACRO(x) x +int main() +{ + int X[1]; + MACRO(std::cout << X + << X[0]); + std::cout << X + << X; + std::cout2 << X + << X; + std::cout << X + << X[0]; + std::cout << + X << + Y; + std::cout + << X + << Y; + std::cout + << + X + << + Y; +} + +#define A_LONG_MACRO_NAME(x) x + +void f() { + std::cout << "Hello, " + << "World!" + << std::endl; + A_LONG_MACRO_NAME(std::cout << "Hello, " + << "World!" + << std::endl); + A_LONG_MACRO_NAME( + std::cout << "Hello, " + << "World!" + << std::endl); +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30254-align_left_shift2.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30254-align_left_shift2.cpp new file mode 100644 index 00000000..bfea744c --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30254-align_left_shift2.cpp @@ -0,0 +1,32 @@ +void g() +{ + RLOGD(m_log) + << "str1" + << var; + + if (something) + cout << "blah"; + +} + +void f() +{ + cout << something( + arg); + cout + << "something"; + cout << + "something"; + + RLOGD(m_log) + << "WriteReqSize()"; + + RLOGD(m_log) << + base::sprintfT( + "something %u ", + m_pendingAccepts); + + RLOGDD(m_log) << sprintfT( + "something id=%u", + newSocket->GetId()); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30255-align_constr.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30255-align_constr.cpp new file mode 100644 index 00000000..380f0c8b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30255-align_constr.cpp @@ -0,0 +1,16 @@ +struct TelegramIndex +{ + TelegramIndex(const char *pN, unsigned long nI) : + pTelName(pN), + nTelIndex(n) + { + } + + ~TelegramIndex() + { + } + + const char *const pTelName; + unsigned long nTelIndex; +}; + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30256-func_call.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30256-func_call.cpp new file mode 100644 index 00000000..e3eff88c --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30256-func_call.cpp @@ -0,0 +1,14 @@ +void f() +{ + auto x = func1( + arg, + arg); +} + +void f() +{ + return func2( + arg, + arg); +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30257-func_call_chain.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30257-func_call_chain.cpp new file mode 100644 index 00000000..7e2f3931 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30257-func_call_chain.cpp @@ -0,0 +1,7 @@ +void f() +{ + m_complete.back().m_replicas.clear(); + + m_complete.back().m_replicas.push_back(serverId); + m_pending.front().m_replicas.erase(r); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30258-casts.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30258-casts.cpp new file mode 100644 index 00000000..d8a496fb --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30258-casts.cpp @@ -0,0 +1,6 @@ +void f() +{ + uint32 x = (uint8)b; + uint32 x = (uint16)f(a, b); + uint32 x = (uint32)std::distance(a, b); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30259-sp_after_constr_colon.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30259-sp_after_constr_colon.cpp new file mode 100644 index 00000000..7b63b639 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30259-sp_after_constr_colon.cpp @@ -0,0 +1,6 @@ +struct MyClass : public Foo { + MyClass(int a, + int b, + int c) + :m_a(a), m_b(b), m_c(c) {} +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30260-var_def_gap.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30260-var_def_gap.cpp new file mode 100644 index 00000000..7333d292 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30260-var_def_gap.cpp @@ -0,0 +1,27 @@ +#define A -3 +#define B 163 +#define C 2 + +void foo() +{ + const std::string & targetName1 = pEntry->getTargetName(); + const Point3d_t currentPosition1 = pSatOrbit->GetPositionAtTime(jdNow); +} + +void foo2() +{ + const std::string **targetName2 = pEntry->getTargetName(); + const Point3d_t currentPosition2 = pSatOrbit->GetPositionAtTime(jdNow); +} + +void foo2() +{ + const std::string **targetName3 = pEntry->getTargetName(); + const Point3d_t currentPosition3 = pSatOrbit->GetPositionAtTime(jdNow); +} + +typedef int MY_INT; +typedef int *MY_INTP; +typedef int (*foo_t)(void *bar); +typedef int (*somefunc_t)(void *barstool); + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30261-align_var_def_thresh.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30261-align_var_def_thresh.cpp new file mode 100644 index 00000000..8512377e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30261-align_var_def_thresh.cpp @@ -0,0 +1,64 @@ +void testShortTypes() +{ +// No stars + float a; + double b; + +// All stars + float& a; + double& b; + + float * a; + double * b; + + float & a; + double &b; + +// One star before + double& a; + float b; + + double & a; + float b; + + double &a; + float b; + +// One star after + float b; + double& a; + + float b; + double & a; + + float b; + double &a; +} + +void testLongTypes() +{ + int int_var; + int * int_ptr_var; + int * int_ptr_var; + float float_var; + float & float_ref_var; + float & float_ref_var; + double & double_var; + long_type little_long_var; + SomeLongNamespace::SomeLongType long_var; + int * other_int_var; + SomeLooooongType long_var; + SomeLoooooooooongType looong_var; + int int_var; + SomeLongNamespace::OtherLongNamespace::SomeLongType very_long_var; + int * int_ptr_var; + float float_var; + float & float_ref_var; + double & double_var; + SomeLongNamespace::SomeLongType long_var; + float float_var; + int * other_int_var; + int other_int_var; + int * other_int_var; + int& other_int_var; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30262-align_var_def_thresh.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30262-align_var_def_thresh.cpp new file mode 100644 index 00000000..4996a3d3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30262-align_var_def_thresh.cpp @@ -0,0 +1,64 @@ +void testShortTypes() +{ +// No stars + float a; + double b; + +// All stars + float & a; + double& b; + + float * a; + double * b; + + float &a; + double &b; + +// One star before + double& a; + float b; + + double & a; + float b; + + double &a; + float b; + +// One star after + float b; + double& a; + + float b; + double & a; + + float b; + double &a; +} + +void testLongTypes() +{ + int int_var; + int * int_ptr_var; + int *int_ptr_var; + float float_var; + float &float_ref_var; + float & float_ref_var; + double & double_var; + long_type little_long_var; + SomeLongNamespace::SomeLongType long_var; + int * other_int_var; + SomeLooooongType long_var; + SomeLoooooooooongType looong_var; + int int_var; + SomeLongNamespace::OtherLongNamespace::SomeLongType very_long_var; + int * int_ptr_var; + float float_var; + float & float_ref_var; + double & double_var; + SomeLongNamespace::SomeLongType long_var; + float float_var; + int * other_int_var; + int other_int_var; + int *other_int_var; + int & other_int_var; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30263-align_var_def_thresh.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30263-align_var_def_thresh.cpp new file mode 100644 index 00000000..1e10f370 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30263-align_var_def_thresh.cpp @@ -0,0 +1,64 @@ +void testShortTypes() +{ +// No stars + float a; + double b; + +// All stars + float & a; + double& b; + + float * a; + double * b; + + float &a; + double &b; + +// One star before + double& a; + float b; + + double & a; + float b; + + double &a; + float b; + +// One star after + float b; + double& a; + + float b; + double & a; + + float b; + double &a; +} + +void testLongTypes() +{ + int int_var; + int * int_ptr_var; + int *int_ptr_var; + float float_var; + float &float_ref_var; + float & float_ref_var; + double & double_var; + long_type little_long_var; + SomeLongNamespace::SomeLongType long_var; + int * other_int_var; + SomeLooooongType long_var; + SomeLoooooooooongType looong_var; + int int_var; + SomeLongNamespace::OtherLongNamespace::SomeLongType very_long_var; + int * int_ptr_var; + float float_var; + float & float_ref_var; + double & double_var; + SomeLongNamespace::SomeLongType long_var; + float float_var; + int * other_int_var; + int other_int_var; + int *other_int_var; + int & other_int_var; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30264-Issue_2668.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30264-Issue_2668.cpp new file mode 100644 index 00000000..da8e118f --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30264-Issue_2668.cpp @@ -0,0 +1,10 @@ +class SubClass2 : public SuperClass +{ +bool variable; +int abcde; + +SubClass2() + : SuperClass() +{ +} +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30265-long_br_cmt.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30265-long_br_cmt.cpp new file mode 100644 index 00000000..8ebdcec9 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30265-long_br_cmt.cpp @@ -0,0 +1,52 @@ + +namespace a::b +{ + void foo::bar(int xx) + { + switch (xx) + { + case 1: + // filler + while (true) + { + if (something) + { + do_something(); + } + else if (something_else) + { + do_something_else(); + } + else + { + dont_do_anything(); + break; + } + } + break; + + case 2: + handle_two(); + + default: + handle_the_rest(); + break; + } // switch + } // foo::bar + + class long_class + { + private: + int m_a; + int m_name; + + public: + long_class(int a) {} + + void f1() {} + + void f2() {} + + void f3() {} + }; // class long_class +} // namespace a::b diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30266-Issue_2921.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30266-Issue_2921.cpp new file mode 100644 index 00000000..53e3c495 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30266-Issue_2921.cpp @@ -0,0 +1,34 @@ +namespace Namespace1 +{ +namespace Namespace2 +{ +namespace Namespace3 +{ +namespace Namespace4 +{ +namespace Namespace5 +{ +namespace Namespace6 +{ +namespace Namespace7 +{ +namespace Namespace8 +{ +class ClassName +{ +public: +ClassName(int a, + int b); + +private: +int a; +int b; +}; +} +} +} +} +} +} +} +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30267-Issue_2930.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30267-Issue_2930.cpp new file mode 100644 index 00000000..00cff53b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30267-Issue_2930.cpp @@ -0,0 +1,8 @@ +int +main ( + int argc, + char ** argv +) +{ + return 0; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30268-Issue_3018.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30268-Issue_3018.cpp new file mode 100644 index 00000000..ddbb473e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30268-Issue_3018.cpp @@ -0,0 +1,7 @@ +class Class +{ +int fa(); +int* fpa(); +int fb(); +int& frb(); +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30270-const_throw.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30270-const_throw.cpp new file mode 100644 index 00000000..44f0ca68 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30270-const_throw.cpp @@ -0,0 +1,17 @@ +void GetFoo(void) + const +{ + return (m_Foo); +} + +int GetFoo(void) + throw (std::bad_alloc) +{ + return (m_Foo); +} + +class foo { + void bar(void) + const; +}; + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30271-sp_throw_paren.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30271-sp_throw_paren.cpp new file mode 100644 index 00000000..21ce9291 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30271-sp_throw_paren.cpp @@ -0,0 +1,7 @@ + +void foo() +{ + throw(x); + throw(y); + throw(z); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30272-sp_throw_paren.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30272-sp_throw_paren.cpp new file mode 100644 index 00000000..ea851aff --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30272-sp_throw_paren.cpp @@ -0,0 +1,7 @@ + +void foo() +{ + throw (x); + throw (y); + throw (z); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30273-sp_cparen_oparen.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30273-sp_cparen_oparen.cpp new file mode 100644 index 00000000..ee0d705b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30273-sp_cparen_oparen.cpp @@ -0,0 +1,5 @@ +class STDMETHOD +{ + STDMETHOD(GetValues) (BSTR bsName, REFDATA** pData); + STDMETHOD(GetValues) (BSTR bsName, REFDATA** pData); +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30274-sp_cparen_oparen.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30274-sp_cparen_oparen.cpp new file mode 100644 index 00000000..93cc7f86 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30274-sp_cparen_oparen.cpp @@ -0,0 +1,5 @@ +class STDMETHOD +{ + STDMETHOD(GetValues)(BSTR bsName, REFDATA** pData); + STDMETHOD(GetValues)(BSTR bsName, REFDATA** pData); +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30275-bug_1321.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30275-bug_1321.cpp new file mode 100644 index 00000000..5e708c11 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30275-bug_1321.cpp @@ -0,0 +1,6 @@ +#include <utility> + +template <typename Fun, typename ... Args> +inline decltype(auto) Invoke(Fun&& f, Args&&... args) +noexcept(noexcept(std::forward<Fun>(f)(std::forward<Args>(args) ...))) +{ return std::forward<Fun>(f)(std::forward<Args>(args) ...); } diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30278-bug_1439.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30278-bug_1439.cpp new file mode 100644 index 00000000..d560522b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30278-bug_1439.cpp @@ -0,0 +1,2 @@ +struct A; +struct B; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30279-indent-inside-ternary-operator.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30279-indent-inside-ternary-operator.cpp new file mode 100644 index 00000000..80456e65 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30279-indent-inside-ternary-operator.cpp @@ -0,0 +1,125 @@ +(tmp + ? tmp->IsNewline() + ? "newline" + : tmp->IsComment() + ? "comment" + : "other" + : tmp->IsNewline() + ? "newline" + : tmp->IsComment() + ? "comment" + : "other"); + +a +? b + + c +: d + + e; + +return + outerFlag + ? RadioButton + : innerFlag + ? Badge + : nil; + +x = outerFlag + ? RadioButton( + arg1 + ) + : Checkbutton + .arg2; + +Builder +.child( + outerFlag + ? RadioButton( + buttonArg + ) + : innerFlag + ? Badge + .component( + LabelText) + : nil + ); + + +accessoryType +? ConKSC1{} +: flag == false + ? ConKSC2{} + .build() + : flag == true + ? ConKSC3{} + .build() + : ConKSC4{} + .build(); + +options.meta == nil +? metaCmpnt +: CBuilder() + .spacing(4) + .subCmpnt( + CBuilder() + .build()); + +options.meta == nil +? CBuilder() + .spacing(4) + .subCmpnt( + CBuilder() + .build() + ) +: Builder + .spacing; + +options == nil ? CBuilder() + .spacing(6) +: Builder + .spacing; + +options == nil ? CBuilder() + .spacing(6) : Builder + .spacing; + +flag +? isChild + ? TypeBack + : TypeCancel +: nil; + + +func something() { + if (flag) { + x == flag + ? Builder + .spacing + : Builder + .spacing; + } +} + + +flag1 +? ( flag2 + ? ( flag3 + ? result1 + : result2 ) + : ( result3 ) + ) +: ( flag5 + ? ( flag + ? result4 + : result5) + : ( flag6 + ? result6 + : ( result7 ) + ) + ); + + +flag1 +? result1 +: ( + flag5 + ); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30280-sf557.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30280-sf557.cpp new file mode 100644 index 00000000..287bc9c1 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30280-sf557.cpp @@ -0,0 +1,4 @@ +//test.cpp +void test_fun(std::size_t a, + std::size_t /* b */); + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30281-Issue_2478.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30281-Issue_2478.cpp new file mode 100644 index 00000000..40674590 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30281-Issue_2478.cpp @@ -0,0 +1,41 @@ +//example file +typedef int X35GlobalT1; +typedef int X35T2; + +void fooX35a() +{ + ::X35GlobalT1 a1; + X35T2 a2; + + ::X35GlobalT1 a3 = 1; + X35T2 a4 = 1; +} + +void fooX35b() +{ + X35GlobalT1 a1; + X35T2 a2; + + X35GlobalT1 a3 = 1; + X35T2 a4 = 1; +} + +class X35_1a +{ +private: +::X35GlobalT1 a1; +X35T2 a2; + +::X35GlobalT1 a3 = 1; +X35T2 a4 = 1; +}; + +class X35_1b +{ +private: +X35GlobalT1 a1; +X35T2 a2; + +X35GlobalT1 a3 = 1; +X35T2 a4 = 1; +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30282-Issue_2703.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30282-Issue_2703.cpp new file mode 100644 index 00000000..ec4554e9 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30282-Issue_2703.cpp @@ -0,0 +1,14 @@ +#define DEFINE_OPERATORS(classT, flagsT) \ + inline classT::flagsT \ + operator&(const classT::flagsT& lh1, \ + const classT::flagsT::EnumType rh1) \ + { \ + return classT::flagsT(lhs) &= rhs; \ + } \ + \ + inline classT::flagsT \ + operator&(const classT::flagsT::EnumType lh2, \ + const classT::flagsT& rh2) \ + { \ + return classT::flagsT(lhs) &= rhs; \ + } diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30283-Issue_3321.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30283-Issue_3321.h new file mode 100644 index 00000000..9444d24c --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30283-Issue_3321.h @@ -0,0 +1,8 @@ +auto l1 = []() { + }; +auto l2 = [&]() { + }; +auto l3 = []() noexcept { + }; +auto l4 = [&]() noexcept { + }; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30284-Issue_2957.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30284-Issue_2957.cpp new file mode 100644 index 00000000..bd52cb8c --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30284-Issue_2957.cpp @@ -0,0 +1,7 @@ +bus_type i2c_bus_type = +{ + .name = "i2c", + .match = i2c_device_match, + .suspend = i2c_bus_suspend, + .resume = i2c_bus_resume, +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30285-Issue_2971.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30285-Issue_2971.cpp new file mode 100644 index 00000000..52e7a253 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30285-Issue_2971.cpp @@ -0,0 +1,11 @@ +#include <iostream> +class X33 +{ + int + f1(std::istream* c1) + { + int i; + *c1 >> i; + return i; + } +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30286-Issue_3558.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30286-Issue_3558.cpp new file mode 100644 index 00000000..561821ee --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30286-Issue_3558.cpp @@ -0,0 +1,4 @@ +int main() +{ + return foo ? foo : bar & mask; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30287-Issue_3786.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30287-Issue_3786.cpp new file mode 100644 index 00000000..dfb53cdc --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30287-Issue_3786.cpp @@ -0,0 +1,4 @@ +unsigned char wow[][2] = { + { 0, 24,}, + { 152, 1,}, +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30287-Issue_3786.rerun.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30287-Issue_3786.rerun.cpp new file mode 100644 index 00000000..41ebe641 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30287-Issue_3786.rerun.cpp @@ -0,0 +1,4 @@ +unsigned char wow[][2] = { + { 0, 24, }, + { 152, 1, }, +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30290-align_left_shift.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30290-align_left_shift.cpp new file mode 100644 index 00000000..8591a642 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30290-align_left_shift.cpp @@ -0,0 +1,41 @@ +#include <iostream> +#define MACRO(x) x +int main() +{ + int X[1]; + MACRO(std::cout << X + << X[0]); + std::cout << X + << X; + std::cout2 << X + << X; + std::cout << X + << X[0]; + std::cout << + X << + Y; + std::cout + << X + << Y; + std::cout + << + X + << + Y; +} + +#define A_LONG_MACRO_NAME(x) x + +void f() { + std::cout << "Hello, " + << "World!" + << std::endl; + A_LONG_MACRO_NAME(std::cout << "Hello, " + << "World!" + << std::endl); + A_LONG_MACRO_NAME( + std::cout << "Hello, " + << "World!" + << std::endl); +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30291-indent_shift.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30291-indent_shift.cpp new file mode 100644 index 00000000..bc1ae2e5 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30291-indent_shift.cpp @@ -0,0 +1,139 @@ +// We want simple 4-space indentation for each nesting "level". + +// cannot find a way to tell uncrustify to indent the line with parenthesis +int case2() { + + if (condition) { + // some code here + } + + std::out << + "hello " << "world " << + (who ? "and " : "or ") << + "all " << + "others" << ";" << std::endl; + + // and + + if (condition) { + // some code here + } + + std::out << + "hello " << "world " << + ("and ") << + "all " << + "others" << ";" << std::endl; + + if (cond) + std::out << "hi"; + + if (cond) + std::out + << "hi" + << "and" + << "more" + ; + + switch (var) { + case 0: + log() << 5 + << 5; + break; + } + +#if 0 + out + << 5; +#endif + + return log + >> var + >> second + ; +} + + +// uncrustify aligns (with the << on the first line) instead of indenting +void case3() +{ + + if (condition1) { + + if (condition2) { + + std::out << "hello " + << "world " + << (who ? "and " : "or ") + << "all " + << "others" << ";" << std::endl; + + } + } + + // this often works better, but has problems with parentheses: + + if (condition1) { + if (condition2) { + std::out << "hello " << + "world " << + (who ? "and " : "or ") << + "all " << + "others" << ";" << std::endl; + } + } +} + +// uncrustify does not indent >> at all! +void case4() +{ + if (condition) { + // some code here + } + + std::in >> a + >> b + >> (who ? c : d) >> + >> e; + + // and + + if (condition1) { + + if (condition2) { + std::in >> a >> + b >> + (who ? c : d) >> + e; + } + } +} + +void foo() { + + if (head()) + os << "HEAD,"; + else + if (tail()) + os << "TAIL,"; + + if (a >= 0 && + b <= 0) + cerr << "it is"; +} + +int list[] = { + 1, + 2, + 1 << 5, + 1 << 6 +}; + +void check() { + ostream &os = Comment(1) << "error: " << workerName << + " terminated by signal " << WTERMSIG(exitStatus); + + return theAddr.addrN().family() == AF_INET6 ? + (theAddr.octet(idx * 2) << 8) + theAddr.octet(idx * 2 + 1) : + theAddr.octet(idx); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30292-eigen.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30292-eigen.cpp new file mode 100644 index 00000000..aa43434a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30292-eigen.cpp @@ -0,0 +1,7 @@ +void foo() +{ + transform << 0, 1, 0, 0, + 1, 0, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30293-pos_shift.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30293-pos_shift.cpp new file mode 100644 index 00000000..d4a8f1ed --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30293-pos_shift.cpp @@ -0,0 +1,16 @@ +void foo() +{ + // Ensure non-shift operators aren't changed + x = 1 + + 2; + x = 1 + + 2; + x = 1 + 2; + + // Test position of shift operator + cout << x + << y; + cout << x + << y; + cout << x << y; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30294-pos_shift.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30294-pos_shift.cpp new file mode 100644 index 00000000..badc9798 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30294-pos_shift.cpp @@ -0,0 +1,16 @@ +void foo() +{ + // Ensure non-shift operators aren't changed + x = 1 + + 2; + x = 1 + + 2; + x = 1 + 2; + + // Test position of shift operator + cout << x << + y; + cout << x << + y; + cout << x << y; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30295-pos_shift.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30295-pos_shift.cpp new file mode 100644 index 00000000..efb19263 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30295-pos_shift.cpp @@ -0,0 +1,14 @@ +void foo() +{ + // Ensure non-shift operators aren't changed + x = 1 + + 2; + x = 1 + + 2; + x = 1 + 2; + + // Test position of shift operator + cout << x << y; + cout << x << y; + cout << x << y; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30300-enum_shr.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30300-enum_shr.cpp new file mode 100644 index 00000000..26e0d08e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30300-enum_shr.cpp @@ -0,0 +1,8 @@ +enum MyEnum +{ + kOne = 0, + kTwo = 1 << 0, + kThree = 1 << 1, + kFour = 1 << 2 +}; + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30301-enum_class.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30301-enum_class.h new file mode 100644 index 00000000..7ad5e9ea --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30301-enum_class.h @@ -0,0 +1,24 @@ +enum class A +{ + a, + b + +} + +enum struct D +{ + a, + b + +} + +class B { +private: +int x; +} +enum C +{ + a, + b + +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30302-bug_1315.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30302-bug_1315.cpp new file mode 100644 index 00000000..584f9a00 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30302-bug_1315.cpp @@ -0,0 +1,17 @@ +dookie::wookie << "asd" + << "bag" + << "sag"; + +typedef enum +{ + A= 0, + B= 1 << 0, + C= 1 << 1 +}; + +enum +{ + A= 0, + B= 1 << 0, + C= 1 << 1 +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30303-Issue_2902.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30303-Issue_2902.cpp new file mode 100644 index 00000000..ae10d5a9 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30303-Issue_2902.cpp @@ -0,0 +1 @@ +enum empty {}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30310-braced_init_list.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30310-braced_init_list.cpp new file mode 100644 index 00000000..116462c2 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30310-braced_init_list.cpp @@ -0,0 +1,268 @@ +#include <vector> +#include <algorithm> + +using some_type = int; +namespace Ns{ +using some_type = int; +} + +class BracedInitListBase { +public: +BracedInitListBase() + : a{int{1}}, + b(int(some_type(1))), + c(int{some_type(1)}), + d{int(some_type(1))}, + e{some_type{some_type{a}}} +{ +} + +virtual int getA() const { + return a; +} +private: +int a {}; +int b {1}; +int c = {1}; +int d = int{1}; +some_type e {1}; +some_type f = {1}; +some_type g = some_type {1}; +std::vector<some_type> h {some_type {4}, 5}; +::std::vector<some_type> i = ::std::vector<some_type>{4, some_type {5}}; +some_type j = ::std::vector<some_type>{4, some_type {5}}[1]; +some_type k[2] {1, 2}; +some_type l[2] = {1, 2}; + +union SomeUnion { + int a; + some_type b {}; +}; +}; + +class BracedInitListDerived : public BracedInitListBase { +public: +int getA() const override { + return BracedInitListBase::getA(); +} +}; + +some_type inc(some_type a) +{ + return some_type {++a}; +} + +some_type sum(some_type a, some_type b = some_type{1}) +{ + return a + inc(some_type{b - some_type{1}}); +} + +void braced_init_list_int() +{ + { + int a {}; + int b = {}; + int c = int{}; + int d = int{int{}}; + int{}; + int{int{}}; + } + { + int a {1}; + int b = {1}; + int c = int{1}; + int d = int{int{1}}; + int{1}; + int{int{1}}; + } +} + +void braced_init_list_some_type() +{ + { + some_type a {}; + some_type b = {}; + some_type c = some_type {}; + some_type d = some_type {some_type {}}; + some_type{}; + some_type{some_type {}}; + } + { + some_type a {1}; + some_type b = {1}; + some_type c = some_type {1}; + some_type d = some_type {some_type {1}}; + some_type{1}; + some_type{some_type {1}}; + } + { + ::some_type a {1}; + ::some_type b = {1}; + ::some_type c = ::some_type {1}; + ::some_type d = ::some_type {::some_type {1}}; + ::some_type {1}; + ::some_type {::some_type {1}}; + } + { + Ns::some_type a {1}; + Ns::some_type b = {1}; + Ns::some_type c = Ns::some_type {1}; + Ns::some_type d = Ns::some_type {Ns::some_type {1}}; + Ns::some_type {1}; + Ns::some_type {Ns::some_type {1}}; + } + { + ::Ns::some_type a {1}; + ::Ns::some_type b = {1}; + ::Ns::some_type c = ::Ns::some_type {1}; + ::Ns::some_type d = ::Ns::some_type {::Ns::some_type {1}}; + ::Ns::some_type {1}; + ::Ns::some_type {::Ns::some_type {1}}; + } +} + +void braced_init_list_some_type_auto() +{ + { + auto b = some_type {}; + auto c = some_type {some_type {}}; + } + { + auto a = {1}; + auto b = some_type {1}; + auto c = some_type {some_type {1}}; + } + { + auto b = ::some_type {1}; + auto c = ::some_type {::some_type {1}}; + } + { + auto b = Ns::some_type {1}; + auto c = Ns::some_type {Ns::some_type {1}}; + } + { + auto b = ::Ns::some_type {1}; + auto c = ::Ns::some_type {::Ns::some_type {1}}; + } +} + +void braced_init_list_function_call() +{ + { + some_type a {sum(some_type{}, some_type{})}; + some_type b = sum(some_type{}, some_type{}); + some_type c = some_type {sum(some_type{}, some_type{})}; + some_type{sum(some_type{}, some_type{})}; + some_type{some_type {sum(some_type{}, some_type{})}}; + } + { + some_type a {sum(some_type{1}, some_type{1})}; + some_type b = sum(some_type{1}, some_type{1}); + some_type c = some_type {sum(some_type{1}, some_type{1})}; + some_type{sum(some_type{a}, some_type{b})}; + some_type{some_type {sum(some_type{a}, some_type{b})}}; + } + { + ::some_type a {sum(::some_type{1}, ::some_type{1})}; + ::some_type b = sum(::some_type{1}, ::some_type{1}); + ::some_type c = ::some_type {sum(::some_type{1}, ::some_type{1})}; + ::some_type {sum(::some_type{a}, ::some_type{b})}; + ::some_type {::some_type {sum(::some_type{a}, ::some_type{b})}}; + } + { + Ns::some_type a {sum(Ns::some_type{1}, Ns::some_type{1})}; + Ns::some_type b = sum(Ns::some_type{1}, Ns::some_type{1}); + Ns::some_type c = Ns::some_type {sum(Ns::some_type{1}, Ns::some_type{1})}; + Ns::some_type {sum(Ns::some_type{a}, Ns::some_type{b})}; + Ns::some_type {Ns::some_type {sum(Ns::some_type{a}, Ns::some_type{b})}}; + } + { + ::Ns::some_type a {sum(::Ns::some_type{1}, ::Ns::some_type{1})}; + ::Ns::some_type b = sum(::Ns::some_type{1}, ::Ns::some_type{1}); + ::Ns::some_type c = ::Ns::some_type {sum(::Ns::some_type{1}, ::Ns::some_type{1})}; + ::Ns::some_type {sum(::Ns::some_type{a}, ::Ns::some_type{b})}; + ::Ns::some_type {::Ns::some_type {sum(::Ns::some_type{a}, ::Ns::some_type{b})}}; + } +} + +void braced_init_list_function_call_newline() +{ + { + some_type a { + sum(some_type{}, + some_type{} + ) + }; + some_type b = sum( + some_type{}, some_type{}); + some_type c = some_type { + sum( + some_type{}, some_type{})}; + some_type + {sum + (some_type{}, + some_type{} + ) + }; + some_type + {some_type {sum + (some_type{}, some_type{})}}; + } +} + +void braced_init_list_array() +{ + { + some_type a[] {}; + some_type b[] = {}; + some_type c[] = {{}, {}}; + } + { + some_type a[] {1, 2}; + some_type b[] = {1, 2}; + some_type c[] = {some_type {1}, some_type {2}}; + } +} + +void braced_init_list_template() +{ + { + std::vector<some_type> a {}; + std::vector<some_type> b = {}; + std::vector<some_type> c = {{}, {}}; + std::vector<some_type> d = std::vector<some_type>{}; + std::vector<some_type> e = std::vector<some_type>{{}, {}}; + std::vector<some_type> f = std::vector<some_type>{some_type {}, some_type {}}; + std::vector<some_type>{}; + std::vector<some_type>{{}, {}}; + std::vector<some_type>{some_type {}, some_type {}}; + } + { + std::vector<some_type> a {1, 2}; + std::vector<some_type> b = {1, 2}; + std::vector<some_type> c = std::vector<some_type>{1, 2}; + std::vector<some_type> d = std::vector<some_type>{some_type {1}, some_type {2}}; + std::vector<some_type>{1, 2}; + std::vector<some_type>{some_type {1}, some_type {2}}; + } +} + +void braced_init_list_lambda() +{ + std::vector<some_type> a {1, 2}; + some_type b {2}; + + auto c = []{ + return true; + }; + auto d = [](){ + return true; + }; + + std::find_if(a.begin(), a.end(), [&b](const some_type &v){ + return v == b; + }); + std::find_if(a.begin(), a.end(), [](const some_type &v){ + some_type b{2}; return v == b; + }); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30311-uniform_initialization.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30311-uniform_initialization.cpp new file mode 100644 index 00000000..64da585d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30311-uniform_initialization.cpp @@ -0,0 +1,9 @@ +void whatever() { + SomeStruct a = SomeStruct{1, 2, 3}; + + someFuncCall(SomeStruct{4, 5, 6}); +} + +namespace foo { +int bar(); +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30312-return_init_list.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30312-return_init_list.cpp new file mode 100644 index 00000000..ef91c528 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30312-return_init_list.cpp @@ -0,0 +1,30 @@ +inline static std::tuple<bool, std::string> foo(void) { +// should remain a one liner + return{ true, ""s }; +} +inline static std::tuple<bool, std::string, std::string> foo(void) { + if (condition) { +// should remain a one liner + return{ true, ""s, ""s }; + } +// should remain a one liner + return{ false, ""s, ""s }; +} +inline static std::tuple<bool, std::string> foo(void) { +// should indent one level + return{ + true, ""s + }; +} +inline static std::tuple<bool, std::string> foo(void) { +// should indent one level on new line + return + { true, ""s }; +} +inline static std::tuple<bool, std::string> foo(void) { +// should indent one level for braces and another level for values + return + { + true, ""s + }; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30313-sp_brace_brace.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30313-sp_brace_brace.cpp new file mode 100644 index 00000000..2ae91737 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30313-sp_brace_brace.cpp @@ -0,0 +1,14 @@ +template<std::size_t _N, typename _Type, _Type... _Nums> +std::array<uint8_t, _N - 1> constexpr crypt_helper(uint8_t const inSeed, char const (&inString)[_N], std::integer_sequence<_Type, _Nums...>) { + return {{crypt(_Nums, inSeed, static_cast<uint8_t>(inString[_Nums]))...}}; +} +static std::array<double_t, Homology::kNumberOfStats> const m{{ + 0.3, + 0.6, + 1.0 +}}; +static std::array<double_t, Homology::kNumberOfStats> const m = { + 0.3, + 0.6, + 1.0 +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30314-sp_brace_brace.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30314-sp_brace_brace.cpp new file mode 100644 index 00000000..b7ca9839 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30314-sp_brace_brace.cpp @@ -0,0 +1,14 @@ +template<std::size_t _N, typename _Type, _Type... _Nums> +std::array<uint8_t, _N - 1> constexpr crypt_helper(uint8_t const inSeed, char const (&inString)[_N], std::integer_sequence<_Type, _Nums...>) { + return { {crypt(_Nums, inSeed, static_cast<uint8_t>(inString[_Nums]))...} }; +} +static std::array<double_t, Homology::kNumberOfStats> const m{ { + 0.3, + 0.6, + 1.0 +} }; +static std::array<double_t, Homology::kNumberOfStats> const m = { + 0.3, + 0.6, + 1.0 +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30315-return_braced_init.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30315-return_braced_init.cpp new file mode 100644 index 00000000..cf86baeb --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30315-return_braced_init.cpp @@ -0,0 +1,18 @@ +int foo1() +{ + // should not have newline before '.' + return std::pair<int, int>{1, 2}.first; +} + +int foo2() +{ + // should be ARITH, not ADDR + return int{3} & 2; +} + +int foo3() +{ + // should be ARITH, not ADDR + constexpr static int x = 3; + return decltype(x){x} & 2; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30316-Issue_2428.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30316-Issue_2428.cpp new file mode 100644 index 00000000..b2a0a139 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30316-Issue_2428.cpp @@ -0,0 +1,5 @@ +void test() +{ + int{ 0 }; + int abcdef{ 0 }; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30317-braced_init_template_decltype.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30317-braced_init_template_decltype.cpp new file mode 100644 index 00000000..3c22d790 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30317-braced_init_template_decltype.cpp @@ -0,0 +1,13 @@ +#include <algorithm> +#include <type_traits> + +template<typename Arg, + typename ... Args, + typename std::enable_if <!std::is_same<Arg, + decltype (std::make_index_sequence<5> { })>::value, + int>::type = 0> +void foo(Arg &&arg, + Args && ... args) +{ + +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30318-Issue_2949.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30318-Issue_2949.cpp new file mode 100644 index 00000000..d37d7ac3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30318-Issue_2949.cpp @@ -0,0 +1,7 @@ +int index = -1; + +int main(void) +{ + const int x = 2; + int y = index < -x ? 1 : index > x ? 2 : 0; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30319-Issue_2886.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30319-Issue_2886.cpp new file mode 100644 index 00000000..0474c710 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30319-Issue_2886.cpp @@ -0,0 +1 @@ +ValuePrimaryKey<int64_t, Schema, ColumnId1{0}> id = { kTableName, kColumnNameId }; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30320-returns.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30320-returns.cpp new file mode 100644 index 00000000..d1ac08c0 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30320-returns.cpp @@ -0,0 +1,34 @@ +#define foo1(x) { return x; } +#define foo2(x) { return(x); } +#define foo3(x) { return(x); } +#define foo4(x) { return{x}; } +#define foo5(x) { return {x}; } +#define foo6(x) { return /**/ x; } + +#define case1(x) return x +#define case2(x) return(x) +#define case3(x) return(x) +#define case4(x) return{x} +#define case5(x) return {x} +#define case6(x) return /**/ x + +void foo(int x) +{ + switch (x) + { + case 1: + return 1; + case 2: + return(2); + case 3: + return(3); + case 4: + return{4}; + case 5: + return {5}; + case 6: + return /**/ 6; + default: + return; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30321-returns.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30321-returns.cpp new file mode 100644 index 00000000..1abe1e54 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30321-returns.cpp @@ -0,0 +1,34 @@ +#define foo1(x) { return x; } +#define foo2(x) { return (x); } +#define foo3(x) { return (x); } +#define foo4(x) { return{x}; } +#define foo5(x) { return {x}; } +#define foo6(x) { return /**/ x; } + +#define case1(x) return x +#define case2(x) return (x) +#define case3(x) return (x) +#define case4(x) return{x} +#define case5(x) return {x} +#define case6(x) return /**/ x + +void foo(int x) +{ + switch (x) + { + case 1: + return 1; + case 2: + return (2); + case 3: + return (3); + case 4: + return{4}; + case 5: + return {5}; + case 6: + return /**/ 6; + default: + return; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30322-returns.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30322-returns.cpp new file mode 100644 index 00000000..a61b0fcf --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30322-returns.cpp @@ -0,0 +1,34 @@ +#define foo1(x) { return x; } +#define foo2(x) { return(x); } +#define foo3(x) { return (x); } +#define foo4(x) { return{x}; } +#define foo5(x) { return{x}; } +#define foo6(x) { return /**/ x; } + +#define case1(x) return x +#define case2(x) return(x) +#define case3(x) return (x) +#define case4(x) return{x} +#define case5(x) return{x} +#define case6(x) return /**/ x + +void foo(int x) +{ + switch (x) + { + case 1: + return 1; + case 2: + return(2); + case 3: + return (3); + case 4: + return{4}; + case 5: + return{5}; + case 6: + return /**/ 6; + default: + return; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30323-returns.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30323-returns.cpp new file mode 100644 index 00000000..b12cd7eb --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30323-returns.cpp @@ -0,0 +1,34 @@ +#define foo1(x) { return x; } +#define foo2(x) { return(x); } +#define foo3(x) { return (x); } +#define foo4(x) { return {x}; } +#define foo5(x) { return {x}; } +#define foo6(x) { return /**/ x; } + +#define case1(x) return x +#define case2(x) return(x) +#define case3(x) return (x) +#define case4(x) return {x} +#define case5(x) return {x} +#define case6(x) return /**/ x + +void foo(int x) +{ + switch (x) + { + case 1: + return 1; + case 2: + return(2); + case 3: + return (3); + case 4: + return {4}; + case 5: + return {5}; + case 6: + return /**/ 6; + default: + return; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30324-returns.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30324-returns.cpp new file mode 100644 index 00000000..fede22db --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30324-returns.cpp @@ -0,0 +1,34 @@ +#define foo1(x) { return (x); } +#define foo2(x) { return(x); } +#define foo3(x) { return (x); } +#define foo4(x) { return{x}; } +#define foo5(x) { return {x}; } +#define foo6(x) { return /**/ (x); } + +#define case1(x) return (x) +#define case2(x) return(x) +#define case3(x) return (x) +#define case4(x) return{x} +#define case5(x) return {x} +#define case6(x) return /**/ (x) + +void foo(int x) +{ + switch (x) + { + case 1: + return (1); + case 2: + return(2); + case 3: + return (3); + case 4: + return{4}; + case 5: + return {5}; + case 6: + return /**/ (6); + default: + return; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30325-returns.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30325-returns.cpp new file mode 100644 index 00000000..d797f9c7 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30325-returns.cpp @@ -0,0 +1,34 @@ +#define foo1(x) { return x; } +#define foo2(x) { return x; } +#define foo3(x) { return x; } +#define foo4(x) { return{x}; } +#define foo5(x) { return {x}; } +#define foo6(x) { return /**/ x; } + +#define case1(x) return x +#define case2(x) return x +#define case3(x) return x +#define case4(x) return{x} +#define case5(x) return {x} +#define case6(x) return /**/ x + +void foo(int x) +{ + switch (x) + { + case 1: + return 1; + case 2: + return 2; + case 3: + return 3; + case 4: + return{4}; + case 5: + return {5}; + case 6: + return /**/ 6; + default: + return; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30326-indent_off_after_return.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30326-indent_off_after_return.cpp new file mode 100644 index 00000000..6cd6d8e4 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30326-indent_off_after_return.cpp @@ -0,0 +1,60 @@ +int foo1() +{ + return std::pair<int, int>{ + 1, 2 + }.first; +} + +int foo2() +{ + return + int{3} & 2; +} + +int foo3() +{ + constexpr static int x = 3; + return + decltype(x) {x} & 2; +} + +int foo4() +{ + return + new Type(); +} + +int foo5() +{ + return + veryLongMethodCall( + arg1, + longMethodCall( + methodCall( + arg2, arg3 + ), arg4 + ) + ); +} + +int foo6() +{ + auto my_lambda = [] () + { + return 1 + + 2 + + 3; + + }; +} + +template<typename U> +U * +find(const std::string &name = "") const +{ + return find<U>([&name] (auto *pComposite) + { + return name.empty() || + pComposite->getName() == name; + }); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30327-indent_off_after_return.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30327-indent_off_after_return.cpp new file mode 100644 index 00000000..6cd6d8e4 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30327-indent_off_after_return.cpp @@ -0,0 +1,60 @@ +int foo1() +{ + return std::pair<int, int>{ + 1, 2 + }.first; +} + +int foo2() +{ + return + int{3} & 2; +} + +int foo3() +{ + constexpr static int x = 3; + return + decltype(x) {x} & 2; +} + +int foo4() +{ + return + new Type(); +} + +int foo5() +{ + return + veryLongMethodCall( + arg1, + longMethodCall( + methodCall( + arg2, arg3 + ), arg4 + ) + ); +} + +int foo6() +{ + auto my_lambda = [] () + { + return 1 + + 2 + + 3; + + }; +} + +template<typename U> +U * +find(const std::string &name = "") const +{ + return find<U>([&name] (auto *pComposite) + { + return name.empty() || + pComposite->getName() == name; + }); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30328-call_brace_init_lst.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30328-call_brace_init_lst.cpp new file mode 100644 index 00000000..b75c35b1 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30328-call_brace_init_lst.cpp @@ -0,0 +1,33 @@ +void bar() +{ + foo(42, {1, 2, 3, 4}); + foo(42, + {1, 2, 3, 4}); + + foo(42, vector + {1, 2, 3, 4}); + foo(42, + vector + {1, 2, 3, 4}); + foo(42, vector + {1, 2, 3, 4}); + + foo(42, vector<int> + {1, 2, 3, 4}); + foo(42, + vector<int> + {1, 2, 3, 4}); + foo(42, vector<int> + {1, 2, 3, 4}); + foo(42, vector + <int> + {1, 2, 3, 4}); + + foo(42, decltype(something) + {1, 2, 3, 4}); + foo(42, + decltype(something) + {1, 2, 3, 4}); + foo(42, decltype(something) + {1, 2, 3, 4}); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30329-call_brace_init_lst.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30329-call_brace_init_lst.cpp new file mode 100644 index 00000000..83837910 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30329-call_brace_init_lst.cpp @@ -0,0 +1,23 @@ +void bar() +{ + foo(42, {1, 2, 3, 4}); + foo(42, + {1, 2, 3, 4}); + + foo(42, vector{1, 2, 3, 4}); + foo(42, + vector{1, 2, 3, 4}); + foo(42, vector{1, 2, 3, 4}); + + foo(42, vector<int>{1, 2, 3, 4}); + foo(42, + vector<int>{1, 2, 3, 4}); + foo(42, vector<int>{1, 2, 3, 4}); + foo(42, vector + <int>{1, 2, 3, 4}); + + foo(42, decltype(something) {1, 2, 3, 4}); + foo(42, + decltype(something) {1, 2, 3, 4}); + foo(42, decltype(something) {1, 2, 3, 4}); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30330-Issue_3080.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30330-Issue_3080.cpp new file mode 100644 index 00000000..75c6072b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30330-Issue_3080.cpp @@ -0,0 +1,2 @@ +auto j = int{0}; +auto j = decltype(int){0}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30353-indent_ternary-1.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30353-indent_ternary-1.cpp new file mode 100644 index 00000000..c5fa89e5 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30353-indent_ternary-1.cpp @@ -0,0 +1,76 @@ +namespace ns1 { +int getval(void); +void baz(void); +} + + +int foo(int in1, int in2, float in3, double in4) { + int a; int b; int c; int d; + int e; int f; int g; int h; + + a = (in1 < 10) ? in2 : + ns1::getval(); + + b = (in1 < 20) ? in2 : + int(in3 * 0.4); + + c = (in1 < 30) ? in2 : + 1.25 * in4; + + d = (in1 < 40) ? in2 : + -3; + + e = (in1 < 50) ? in2 : + ~3 ^ in1; + + f = (in1 < 60) ? in2 : + !(in1 == in2); + + g = (in1 < 70) ? in2 : + ++in1; + + h = (in1 < 80) ? in2 : + in1 * 2; + + if ((in1 < 10) ? in2 : + ns1::getval()) { + ns1::baz(); + } + + if ((in1 < 20) ? in2 : + int(in3 * 0.4)) { + ns1::baz(); + } + + if ((in1 < 30) ? in2 : + 1.25 * in4) { + ns1::baz(); + } + + if ((in1 < 40) ? in2 : + -3) { + ns1::baz(); + } + + if ((in1 < 50) ? in2 : + ~3 ^ in1) { + ns1::baz(); + } + + if ((in1 < 60) ? in2 : + !(in1 == in2)) { + ns1::baz(); + } + + if ((in1 < 70) ? in2 : + ++in1) { + ns1::baz(); + } + + if ((in1 < 80) ? in2 : + in1 * 2) { + ns1::baz(); + } + + return a+b+c+d+e+f+g+h; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30400-attribute_specifier_seqs.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30400-attribute_specifier_seqs.cpp new file mode 100644 index 00000000..15cc6e3a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30400-attribute_specifier_seqs.cpp @@ -0,0 +1,129 @@ +void asd(void) +{ + a < up_lim() ? do_hi() : do_low; + a[ a<b>c] = d; +} + +[[nodiscard]] inline static CFErrorRef _Nullable CreateErrorIfError(CFStringRef const inDomain, CFIndex const inCode, CFDictionaryRef const inInformation) { + [[maybe_unused]] auto const [iterator, inserted]{ super_type::insert(ioFileReference) }; + if (inCode == 0) { + return nullptr; + } + return ::CFErrorCreate(kCFAllocatorDefault, inDomain, inCode, inInformation); +} + +[[gnu::always_inline]] [[gnu::hot]] [[gnu::const]] [[nodiscard]] +inline int f(); +[[gnu::always_inline, gnu::const, gnu::hot, nodiscard]] +int f(); +[[using gnu : const, always_inline, hot]] [[nodiscard]] +int f [[gnu::always_inline]](); + +int f(int i) [[expects: i > 0]] [[ensures audit x: x < 1]]; + +void f() { + int i [[cats::meow([[]])]]; + int x [[unused]] = f(); +} + +int f(int i) [[deprecated]] { + switch(i) { + case 1: [[fallthrough]]; + [[likely]] case 2: return 1; + } + return 2; +} + +[[ +unused, deprecated("keeping for reference only") +]] +void f() +{ +} + +[[noreturn]] void f() [[deprecated("because")]] { + throw "error"; +} + +void print2(int * [[carries_dependency]] val) +{ + std::cout<<*p<<std::endl; +} + +class X { +public: +int v() const { + return x; +} +int g() [[expects: v() > 0]]; +private: +int k() [[expects: x > 0]]; +int x; +}; + +class [[foo, bar("baz")]] /**/ Y : private Foo, Bar { +public: +int v(int &x) { + return x; +} +}; + +class + [[foo]] + [[bar("baz")]] + Z : Foo, public Bar { +public: +int v(int * x) { + return *x; +} +}; + +int g(int* p) [[ensures: p != nullptr]] +{ + *p = 42; +} + +bool meow(const int&) { + return true; +} +void i(int& x) [[ensures: meow(x)]] +{ + ++x; +} + +enum Enum { + a, b +}; +enum class [[foo]] Enum { + a, b +}; +enum struct [[foo]] /**/ [[bar("baz")]] Enum { + a, b +}; +enum [[foo]] +Enum { + a, b +}; +enum class [[foo]] // +[[bar("baz")]] Enum { + a, b +}; +enum struct // +[[bar("baz")]] Enum { + a, b +}; +enum +[[foo]] [[bar("baz")]] /**/ Enum { + a, b +}; +enum class /**/ [[foo]] [[bar("baz")]] +Enum { + a, b +}; +enum // +struct +[[foo]] +[[bar("baz")]] +Enum { + a, b +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30401-Issue_2570.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30401-Issue_2570.cpp new file mode 100644 index 00000000..44373e77 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30401-Issue_2570.cpp @@ -0,0 +1,3 @@ +class [[nodiscard]] CClass final +{ +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30701-function-def.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30701-function-def.cpp new file mode 100644 index 00000000..89261c8e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30701-function-def.cpp @@ -0,0 +1,116 @@ +int & +Function() +{ + static int x; + return (x); +} + +void +foo1( + int param1, + int param2, + char *param2 + ); + +void +foo2( + int param1, + int param2, + char *param2 + ); + +void +foo3( + int param1, + int param2, // comment + char *param2 + ); + +struct whoopee * +foo4( + int param1, + int param2, + char *param2 /* comment */ + ); + +const struct snickers * +foo5( + int param1, + int param2, + char *param2 + ); + + +void +foo( + int param1, + int param2, + char *param2 + ) +{ + printf("boo!\n"); +} + +int +classname::method(); + +int +classname::method() +{ + foo(); +} + +int +classname::method2(); + +int +classname::method2() +{ + foo2(); +} + +const int& +className::method1( + void + ) const +{ + // stuff +} + +const longtypename& +className::method2( + void + ) const +{ + // stuff +} + +int & +foo(); + +int & +foo() +{ + list_for_each(a,b) { + bar(a); + } + return nuts; +} + +void +Foo::bar() { +} + +Foo::Foo() { +} + +Foo::~Foo() { +} + +void +func( + void + ) +{ + Directory dir("arg"); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30702-function-def.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30702-function-def.cpp new file mode 100644 index 00000000..c1fb4ed4 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30702-function-def.cpp @@ -0,0 +1,82 @@ +int & +Function() +{ + static int x; + return (x); +} + +void foo1(int param1, int param2, char *param2); + +void foo2(int param1, + int param2, + char *param2); + +void foo3(int param1, + int param2, // comment + char *param2); + +struct whoopee *foo4(int param1, int param2, char *param2 /* comment */); + +const struct snickers *foo5(int param1, int param2, char *param2); + + +void +foo(int param1, int param2, char *param2) +{ + printf("boo!\n"); +} + +int classname::method(); + +int +classname::method() +{ + foo(); +} + +int classname::method2(); + +int +classname::method2() +{ + foo2(); +} + +const int& +className::method1(void) const +{ + // stuff +} + +const longtypename& +className::method2(void) const +{ + // stuff +} + +int &foo(); + +int & +foo() +{ + list_for_each(a,b) { + bar(a); + } + return nuts; +} + +void +Foo::bar() { +} + +Foo::Foo() { +} + +Foo::~Foo() { +} + +void +func(void) +{ + Directory dir("arg"); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30703-function-def.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30703-function-def.cpp new file mode 100644 index 00000000..c604152d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30703-function-def.cpp @@ -0,0 +1,70 @@ +int &Function() +{ + static int x; + return (x); +} + +void foo1(int param1, int param2, char *param2); + +void foo2(int param1,int param2,char *param2); + +void foo3(int param1,int param2, // comment + char *param2); + +struct whoopee *foo4(int param1, int param2, char *param2 /* comment */); + +const struct snickers *foo5(int param1, int param2, char *param2); + + +void foo(int param1, int param2, char *param2) +{ + printf("boo!\n"); +} + +int classname::method(); + +int classname::method() +{ + foo(); +} + +int classname::method2(); + +int classname::method2() +{ + foo2(); +} + +const int& className::method1(void) const +{ + // stuff +} + +const longtypename& className::method2(void) const +{ + // stuff +} + +int &foo(); + +int &foo() +{ + list_for_each(a,b) { + bar(a); + } + return nuts; +} + +void Foo::bar() { +} + +Foo::Foo() { +} + +Foo::~Foo() { +} + +void func(void) +{ + Directory dir("arg"); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30705-func_param.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30705-func_param.cpp new file mode 100644 index 00000000..8bdb0ce8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30705-func_param.cpp @@ -0,0 +1,18 @@ +typedef short (*hello1)(char coolParam, + ushort *, + unsigned int anotherone); + +short (*hello2)(char coolParam, + ulong *, + uchar, + unsigned int anotherone); + +short hello3(char coolParam, + ushort *, + unsigned int anotherone); + +void x(custom_t *e, void (*funcptr)); +void x(custom_t *e, void (*funcptr)[]); +void x(custom_t *e, void (*funcptr)(int, int)); +void x(custom_t *e, void (*funcptr)(int, int)[]); + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30706-bug_1020.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30706-bug_1020.cpp new file mode 100644 index 00000000..f0e9e60d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30706-bug_1020.cpp @@ -0,0 +1,12 @@ +void HouseNumberData(Translation const & trans = Translation { }, + Orientation const & orient = Orientation { }, + CategoryIds const & cats = CategoryIds(), + std::string const & txt = std::string { }, + bool active = false); + +void HouseNumberData(Translation const & trans______________, + Orientation const & orient______________________, + CategoryIds const & cats_____________________, + std::string const & txt___________________, + bool active_________); + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30711-semicolons.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30711-semicolons.cpp new file mode 100644 index 00000000..de28deef --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30711-semicolons.cpp @@ -0,0 +1,109 @@ +static int foo(int bar); + +static int foo(int bar) +{ + for (;;) + { + break; + } + if (a) + { + foo(); + } + + if (b) + if (c) + bar(); + else + ; + + else + { + foo(); + } + switch (a) + { + case 1: break; + case 2: break; + default: break; + } + while (b-->0) + { + bar(); + } + do + { + bar(); + } while (b-->0 ); +} + +enum FPP { + FPP_ONE = 1, + FPP_TWO = 2, +}; + +struct narg { + int abc; + char def; + const char *ghi; +}; + +class CFooRun { +long stick(); +int bar() { + m_ick++; +} + +CFooRun(); +~CFooRun() { +} +}; + +void f() +{ + if (tmp[0] == "disk") + { + tmp = split (tmp[1], ","); + DiskEntry entry = { tmp[0], tmp[2], + stxxl::int64 (str2int (tmp[1])) * + stxxl::int64 (1024 * 1024) }; + disks_props.push_back (entry); + } +} + +template < class > struct type; + +template < class T > +class X { +typedef type < T > base; +void f () { + ( base :: operator * () ); +} +}; + +namespace N +{ +class C +{ +#define NOP(x) { \ +} +}; +} + +namespace N +{ +class C +{ +}; +} + +void deallocate2(S **s_ptr) +{ + { + void *stopper_for_apply = (int[]){0}; + void **list_for_apply = (void *[]){(*s_ptr)->arr, *s_ptr, stopper_for_apply}; + for (int i = 0;list_for_apply[i] != stopper_for_apply;i++) { + saferFree((void *) &(list_for_apply[i])); + } + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30712-bug_1158.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30712-bug_1158.cpp new file mode 100644 index 00000000..2a9ba76d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30712-bug_1158.cpp @@ -0,0 +1,4 @@ +void Class1::Func(void) +{ + while (Next()); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30713-fix_for_relational_operators.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30713-fix_for_relational_operators.cpp new file mode 100644 index 00000000..890f2eba --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30713-fix_for_relational_operators.cpp @@ -0,0 +1,8 @@ +void foo() +{ + while (a < b && c > d) + i++; + + for ( ; a < b && c > d; ) + i++; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30714-Issue_1733.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30714-Issue_1733.cpp new file mode 100644 index 00000000..10be5586 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30714-Issue_1733.cpp @@ -0,0 +1,14 @@ +class X15 +{ +enum Enum +{ + e1 +}; + +operator Enum(); +}; + +::X15::operator ::X15::Enum() +{ + return e1; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30715-Issue_2942.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30715-Issue_2942.cpp new file mode 100644 index 00000000..dbecc7f4 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30715-Issue_2942.cpp @@ -0,0 +1 @@ +if (p == b) ; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30720-custom-open-2.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30720-custom-open-2.cpp new file mode 100644 index 00000000..4d05944a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30720-custom-open-2.cpp @@ -0,0 +1,44 @@ + +BEGIN_MESSAGE_MAP(CUSB2_camera_developementDlg, CDialog) + ON_COMMAND(IDC_ESCAPE, On_Escape) + ON_COMMAND(IDC_8_BIT, On_8_Bit) + ON_COMMAND(IDC_14_BIT, On_14_Bit) + ON_COMMAND(IDC_ACQUIRE, On_Acquire) + ON_COMMAND(IDC_SAVE_COLUMN_AVERAGES, On_Save_Column_Averages) + ON_COMMAND(IDC_SAVE_ROW_AVERAGES, On_Save_Row_Averages) + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_WM_CTLCOLOR() +END_MESSAGE_MAP() + +namespace one +{ + namespace two + { + int Func(int a, + int b) + { + return a + b; + } + } +} + +using namespace one::two; + +void Func2(int c, + int d) +{ +} + +int main() +{ + int a; + + switch (a) + { + case 0: + Func2(1, Func(1, 2)); + Func2(1, one::two::Func(1, 2)); + break; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30721-Issue_2386.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30721-Issue_2386.cpp new file mode 100644 index 00000000..ac0b1dd4 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30721-Issue_2386.cpp @@ -0,0 +1,19 @@ +// A + + +std::string getText() +{ + return "Hello World"; +} + +int main(int argc, char *argv[]) +{ + std::cout << getText() << std::endl; + return 0; +} +// This is Hello World with a function call and + +// form feed characters in it for emacs page-break-lines extension +// which draws a horizontal line for each FF char it finds. +// +// this file contains two single h. lines and two consecutive h. lines diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30730-qt-1.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30730-qt-1.cpp new file mode 100644 index 00000000..5d0273e2 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30730-qt-1.cpp @@ -0,0 +1,64 @@ +class Foo : public QObject +{ + Q_OBJECT + +private slots: + void mySlot( ) { + } + +public slots: + void publicSlot( ); + +signals: + void somesignal( ); + +}; + +class foo +{ + bool b; + +public: + int i; +}; +class bar : public + foo +{ + void *p; + +protected: + double d; + enum e {A,B}; + +private: +}; + +class Foo1 : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void mySlot( ); + +public Q_SLOTS: + void publicSlot( ); + +Q_SIGNALS: + void somesignal( ); +}; + +class foo1 +{ + bool b; + +public: + int i; +}; +class bar : public + foo1 +{ + void *p; + +protected: + double d; +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30731-qt-1.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30731-qt-1.cpp new file mode 100644 index 00000000..55b2459b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30731-qt-1.cpp @@ -0,0 +1,86 @@ +class Foo : public QObject +{ + Q_OBJECT + + + private slots: + + void mySlot() { + } + + + public slots: + + void publicSlot(); + + + signals: + + void somesignal(); + +}; + +class foo +{ + bool b; + + + public: + + int i; +}; +class bar : public + foo +{ + void*p; + + + protected: + + double d; + enum e {A,B}; + + + private: +}; + +class Foo1 : public QObject +{ + Q_OBJECT + + + private Q_SLOTS: + + void mySlot(); + + + public Q_SLOTS: + + void publicSlot(); + + + Q_SIGNALS: + + void somesignal(); +}; + +class foo1 +{ + bool b; + + + public: + + int i; +}; +class bar : public + foo1 +{ + void*p; + + + protected: + + double d; +}; + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30732-Issue_2734.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30732-Issue_2734.cpp new file mode 100644 index 00000000..27dfdc70 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30732-Issue_2734.cpp @@ -0,0 +1 @@ +connect( server, SIGNAL(newConnection()), this, SLOT(ok())); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30740-sef.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30740-sef.cpp new file mode 100644 index 00000000..8730ba15 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30740-sef.cpp @@ -0,0 +1,17 @@ +CFoo::CFoo(const DWORD something,
+ const RECT& positionRect,
+ const UINT aNumber,
+ bool thisIsReadOnly,
+ const CString& windowTitle,
+ CInfo* pStructInfo,
+ int widthOfSomething)
+ : CSuperFoo(something, positionRect, aNumber,
+ thisIsReadOnly, windowTitle),
+ m_pInfo(pInfo),
+ m_width(widthOfSomething)
+{
+}
+
+
+// this_comment_has_a_first_word_that_is_too_long_to_fit_into_a_line_without_wrapping
+// and should not start with a blank comment line.
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30741-al.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30741-al.cpp new file mode 100644 index 00000000..1c911bf2 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30741-al.cpp @@ -0,0 +1,40 @@ +/* ctest4 */ +fm_status fm2000EventHandlingInitialize(fm_int sw); +fm_status fm2000MacTableOverflowStart(fm_int sw); +fm_bool fm2000ProcessMATableEntry(fm_mac_table_work_list *pWork, + fm_int sw, + fm_int index, + fm_thread * event_handler, + fm_uint32 * numUpdates, + fm_event ** event); + + +void foo() +{ + Logger log = new Logger(); + Logger log = new Logger(); + + log.foo.bar = 5; + log.narf.sweat = "cat"; + + for (i = 0 ; i < 5 ; i++) + { + bar(i); + } +} /* foo */ + + + + +int this_works(int x); +int bug(int); /* BUG: left-aligned */ + + +typedef int fooman; +enum FLAGS +{ + FLAGS_decimal = 1, /* decimal */ + FLAGS_unsigned = 2, /* u or U suffix */ + FLAGS_long = 4, /* l or L suffix */ + +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30742-delete.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30742-delete.cpp new file mode 100644 index 00000000..c33aa682 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30742-delete.cpp @@ -0,0 +1,10 @@ + +void x(int **d) { + delete *d; +} + +void x(int& d) { + delete &d; +} + + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30745-Issue_2170.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30745-Issue_2170.cpp new file mode 100644 index 00000000..f1edafd8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30745-Issue_2170.cpp @@ -0,0 +1,8 @@ +class Foo +{ +public: +Foo( int bar = 1 ); +Foo( const Foo & ) = delete; +Foo &operator= ( const Foo & ) = delete; +~Foo(); +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30746-DefaultAndDelete.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30746-DefaultAndDelete.cpp new file mode 100644 index 00000000..7dff7dd5 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30746-DefaultAndDelete.cpp @@ -0,0 +1,12 @@ +class Foo +{ +public: +Foo( int bar) = 0; +Foo( int bar = 777 ); +Foo( const Foo & ) = delete; +Foo( int boo ) = default; +Foo( unsigned int ) = default; +Foo( unsigned int boo =999 ); +Foo &operator= ( const Foo & ) = delete; +~Foo(); +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30747-DefaultAndDelete.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30747-DefaultAndDelete.cpp new file mode 100644 index 00000000..30d315a7 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30747-DefaultAndDelete.cpp @@ -0,0 +1,12 @@ +class Foo +{ +public: +Foo( int bar) = 0; +Foo( int bar = 777 ); +Foo( const Foo & ) = delete; +Foo( int boo ) = default; +Foo( unsigned int ) = default; +Foo( unsigned int boo=999 ); +Foo &operator= ( const Foo & ) = delete; +~Foo(); +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30748-DefaultAndDelete.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30748-DefaultAndDelete.cpp new file mode 100644 index 00000000..9b55a964 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30748-DefaultAndDelete.cpp @@ -0,0 +1,12 @@ +class Foo +{ +public: +Foo( int bar) = 0; +Foo( int bar = 777 ); +Foo( const Foo & ) = delete; +Foo( int boo ) = default; +Foo( unsigned int ) = default; +Foo( unsigned int boo=999 ); +Foo &operator= ( const Foo & ) = delete; +~Foo(); +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30750-lambda.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30750-lambda.cpp new file mode 100644 index 00000000..daa4bac4 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30750-lambda.cpp @@ -0,0 +1,115 @@ +void f1() +{ + auto a = + [ = ](int *a, Something& b) + { + std::cout << "blah: " << *a; + }; +} + +void f1a() +{ + std::for_each(a, b, + [](Something& b) + { + std::cout << "blah: " << *a; + }); +} + +void f1b() +{ + std::for_each(a, b, + [](int& b) -> foo + { + b += 3; + return(b); + }); +} + +void f2() +{ + Invoke(a, b, + [&one, two](int *a, Something& b) + { + std::cout << "blah: " << *a; + }); +} + +void f3a() +{ + auto a = [] { + }; + auto b = [] { + return(true); + }; +} + +void f3b() +{ + Invoke(a, b, + [&one, two] + { + std::cout << "blah: " << one << two; + }); +} + +void f3c() +{ + int a[]{}; +} + +void g1() +{ + auto a = [ = ](int *a, Something&b) { + std::cout << "blah: " << *a; + }; +} + +void g1a() +{ + std::for_each(a, b, [](Something& b) { + std::cout << "blah: " << *a; + }); +} + +void g1b() +{ + std::for_each(a, b, [](int& b)->foo { + b += 3; + return(b); + }); +} + +void g2() +{ + Invoke(a, b, + [&one, two](int *a, Something&b) { + std::cout << "blah: " << *a; + }); +} + +void h1() +{ + []() -> int + { + return(33); + }(); + + []() noexcept ->int + { + return(33); + }(); +} + +void h2() +{ + [](int a) -> int + { + return(a + 33); + }(21); + + [](int a) noexcept ->int + { + return(a + 33); + }(21); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30751-lambda.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30751-lambda.cpp new file mode 100644 index 00000000..291610c5 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30751-lambda.cpp @@ -0,0 +1,94 @@ +void f1() +{ + auto a = + [=] (int *a, Something& b) { + std::cout << "blah: " << *a; + }; +} + +void f1a() +{ + std::for_each(a, b, + [] (Something& b) { + std::cout << "blah: " << *a; + }); +} + +void f1b() +{ + std::for_each(a, b, + [] (int& b) -> foo { + b += 3; + return(b); + }); +} + +void f2() +{ + Invoke(a, b, + [&one, two] (int *a, Something& b) { + std::cout << "blah: " << *a; + }); +} + +void f3a() +{ + auto a = [] {}; + auto b = [] { return(true); }; +} + +void f3b() +{ + Invoke(a, b, + [&one, two] { + std::cout << "blah: " << one << two; + }); +} + +void f3c() +{ + int a[]{}; +} + +void g1() +{ + auto a = [=] (int *a, Something&b) { std::cout << "blah: " << *a; }; +} + +void g1a() +{ + std::for_each(a, b, [] (Something& b) { std::cout << "blah: " << *a; }); +} + +void g1b() +{ + std::for_each(a, b, [] (int& b)->foo { b += 3; return(b); }); +} + +void g2() +{ + Invoke(a, b, + [&one, two] (int *a, Something&b) { std::cout << "blah: " << *a; }); +} + +void h1() +{ + [] () -> int { + return(33); + }(); + + [] () noexcept ->int { + return(33); + }(); +} + +void h2() +{ + [] (int a) -> int { + return(a + 33); + }(21); + + [] (int a) noexcept ->int { + return(a + 33); + }(21); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30752-lambda.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30752-lambda.cpp new file mode 100644 index 00000000..5c0f72b0 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30752-lambda.cpp @@ -0,0 +1,128 @@ +void f1() +{ + auto a = + [=] (int *a, Something& b) + { + std::cout << "blah: " << *a; + }; +} + +void f1a() +{ + std::for_each(a, b, + [] (Something& b) + { + std::cout << "blah: " << *a; + } + ); +} + +void f1b() +{ + std::for_each(a, b, + [] (int& b) -> foo + { + b += 3; + return(b); + } + ); +} + +void f2() +{ + Invoke(a, b, + [&one, two] (int *a, Something& b) + { + std::cout << "blah: " << *a; + } + ); +} + +void f3a() +{ + auto a = [] + { + }; + auto b = [] + { + return(true); + }; +} + +void f3b() +{ + Invoke(a, b, + [&one, two] + { + std::cout << "blah: " << one << two; + } + ); +} + +void f3c() +{ + int a[]{}; +} + +void g1() +{ + auto a = [=] (int *a, Something&b) + { + std::cout << "blah: " << *a; + }; +} + +void g1a() +{ + std::for_each(a, b, [] (Something& b) + { + std::cout << "blah: " << *a; + } + ); +} + +void g1b() +{ + std::for_each(a, b, [] (int& b)->foo + { + b += 3; + return(b); + } + ); +} + +void g2() +{ + Invoke(a, b, + [&one, two] (int *a, Something&b) + { + std::cout << "blah: " << *a; + } + ); +} + +void h1() +{ + [] () -> int + { + return(33); + }(); + + [] () noexcept ->int + { + return(33); + }(); +} + +void h2() +{ + [] (int a) -> int + { + return(a + 33); + }(21); + + [] (int a) noexcept ->int + { + return(a + 33); + }(21); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30753-lambda2.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30753-lambda2.cpp new file mode 100644 index 00000000..d91798a6 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30753-lambda2.cpp @@ -0,0 +1,98 @@ +void f1() +{ + auto a = + [=] (int *a, Something& b){ + std::cout << "blah: " << *a; + }; +} + +void f1a() +{ + std::for_each(a, b, + [] (Something& b){ + std::cout << "blah: " << *a; + } + ); +} + +void f1b() +{ + std::for_each(a, b, + [] (int& b) -> foo { + b += 3; + return(b); + } + ); +} + +void f2() +{ + Invoke(a, b, + [&one, two] (int *a, Something& b){ + std::cout << "blah: " << *a; + } + ); +} + +void f3a() +{ + auto a = [] {}; + auto b = []{ return(true); }; +} + +void f3b() +{ + Invoke(a, b, + [&one, two]{ + std::cout << "blah: " << one << two; + } + ); +} + +void f3c() +{ + int a[]{}; +} + +void g1() +{ + auto a = [=] (int *a, Something&b) { std::cout << "blah: " << *a; }; +} + +void g1a() +{ + std::for_each(a, b, [] (Something& b){ std::cout << "blah: " << *a; }); +} + +void g1b() +{ + std::for_each(a, b, [] (int& b)->foo { b += 3; return(b); }); +} + +void g2() +{ + Invoke(a, b, + [&one, two] (int *a, Something&b){ std::cout << "blah: " << *a; }); +} + +void h1() +{ + [] () -> int { + return(33); + }(); + + [] () noexcept ->int { + return(33); + }(); +} + +void h2() +{ + [] (int a) -> int { + return(a + 33); + }(21); + + [] (int a) noexcept ->int { + return(a + 33); + }(21); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30754-bug_i_682.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30754-bug_i_682.h new file mode 100644 index 00000000..51c58e23 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30754-bug_i_682.h @@ -0,0 +1,5 @@ +void foo()
+{
+ return [=](T* t) {
+ };
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30755-bug_i_938.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30755-bug_i_938.h new file mode 100644 index 00000000..b13997a6 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30755-bug_i_938.h @@ -0,0 +1,2 @@ + +void function(void); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30756-bug_1296.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30756-bug_1296.cpp new file mode 100644 index 00000000..7f7757c4 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30756-bug_1296.cpp @@ -0,0 +1,7 @@ +int main() +{ + auto lambda2222222222222222222 = [&]() + { + code(); + }; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30757-Issue_3054.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30757-Issue_3054.cpp new file mode 100644 index 00000000..53edc388 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30757-Issue_3054.cpp @@ -0,0 +1,7 @@ +void func() +{ + parallel_for(0, 100, [&](const int i){ + const std::vector<int> values = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }; + return values[i]; + }); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30758-Issue_3054-2.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30758-Issue_3054-2.cpp new file mode 100644 index 00000000..e4c1c8da --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30758-Issue_3054-2.cpp @@ -0,0 +1,9 @@ +void func() +{ + parallel_for(0, 100, + [&](int aaaaaa, int bbbbbbb, int ccccccc, int ddddddd, + const int eee){ + // do something + return a; + }); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30759-lambda2.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30759-lambda2.cpp new file mode 100644 index 00000000..09c779b5 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30759-lambda2.cpp @@ -0,0 +1,98 @@ +void f1() +{ + auto a = + [=] (int *a, Something& b){ + std::cout << "blah: " << *a; + }; +} + +void f1a() +{ + std::for_each(a, b, + [] (Something& b){ + std::cout << "blah: " << *a; + } + ); +} + +void f1b() +{ + std::for_each(a, b, + [] (int& b) -> foo { + b += 3; + return(b); + } + ); +} + +void f2() +{ + Invoke(a, b, + [&one, two] (int *a, Something& b){ + std::cout << "blah: " << *a; + } + ); +} + +void f3a() +{ + auto a = [] {}; + auto b = []{ return(true); }; +} + +void f3b() +{ + Invoke(a, b, + [&one, two]{ + std::cout << "blah: " << one << two; + } + ); +} + +void f3c() +{ + int a[]{}; +} + +void g1() +{ + auto a = [=] (int *a, Something&b) { std::cout << "blah: " << *a; }; +} + +void g1a() +{ + std::for_each(a, b, [] (Something& b){ std::cout << "blah: " << *a; }); +} + +void g1b() +{ + std::for_each(a, b, [] (int& b)->foo { b += 3; return(b); }); +} + +void g2() +{ + Invoke(a, b, + [&one, two] (int *a, Something&b){ std::cout << "blah: " << *a; }); +} + +void h1() +{ + [] () -> int { + return(33); + }(); + + [] () noexcept ->int { + return(33); + }(); +} + +void h2() +{ + [] (int a) -> int { + return(a + 33); + }(21); + + [] (int a) noexcept ->int { + return(a + 33); + }(21); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30760-bug_1296.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30760-bug_1296.cpp new file mode 100644 index 00000000..a5535041 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30760-bug_1296.cpp @@ -0,0 +1,7 @@ +int main() +{ + auto lambda2222222222222222222 = [&]() + { + code(); + }; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30761-out-668.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30761-out-668.cpp new file mode 100644 index 00000000..8829c0ce --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30761-out-668.cpp @@ -0,0 +1,4 @@ +int b() +{ + int abcde= 13; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30762-out-668.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30762-out-668.cpp new file mode 100644 index 00000000..0dac74c3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30762-out-668.cpp @@ -0,0 +1,4 @@ +int b() +{ + int abcde= 13; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30763-Issue_2166.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30763-Issue_2166.cpp new file mode 100644 index 00000000..d9ac55c7 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30763-Issue_2166.cpp @@ -0,0 +1,7 @@ +void f1() +{ + int a; + int b; + auto lambda1 = [ &a ](){ return true; }; + auto lambda2 = [ &a = b ](){ return true; }; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30764-Issue_2591.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30764-Issue_2591.cpp new file mode 100644 index 00000000..01ed232e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30764-Issue_2591.cpp @@ -0,0 +1,3 @@ +const auto lambda = [this](int arg) { + doSomething(); +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30765-lambda.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30765-lambda.cpp new file mode 100644 index 00000000..05e372e3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30765-lambda.cpp @@ -0,0 +1,114 @@ +void f1() +{ + auto a = + [=] (int *a, Something & b) + { + std::cout << "blah: " << *a; + }; +} + +void f1a() +{ + std::for_each(a, b, + [](Something & b) + { + std::cout << "blah: " << *a; + }); +} + +void f1b() +{ + std::for_each(a, b, + [](int & b) -> foo + { + b += 3; + return b; + }); +} + +void f2() +{ + Invoke(a, b, + [&one, two](int *a, Something & b) + { + std::cout << "blah: " << *a; + }); +} + +void f3a() +{ + auto a = [] { + }; + auto b = []{ + return true; + }; +} + +void f3b() +{ + Invoke(a, b, + [&one, two] + { + std::cout << "blah: " << one << two; + }); +} + +void f3c() +{ + int a[]{}; +} + +void g1() +{ + auto a = [ = ](int* a, Something &b) { + std::cout << "blah: " << *a; + }; +} + +void g1a() +{ + std::for_each(a, b, [](Something& b){ + std::cout<<"blah: "<<*a; + }); +} + +void g1b() +{ + std::for_each(a, b, [] (int& b)->foo { + b+=3; return(b); + }); +} + +void g2() +{ + Invoke(a, b, + [&one, two] (int *a, Something&b){ + std::cout << "blah: " << *a; + }); +} + +void h1() +{ + []() -> int + { + return 33; + }(); + + []() noexcept ->int + { + return 33; + }(); +} + +void h2() +{ + [](int a) -> int + { + return a + 33; + }(21); + + [](int a) noexcept ->int + { + return a + 33; + }(21); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30766-lambda.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30766-lambda.cpp new file mode 100644 index 00000000..05e372e3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30766-lambda.cpp @@ -0,0 +1,114 @@ +void f1() +{ + auto a = + [=] (int *a, Something & b) + { + std::cout << "blah: " << *a; + }; +} + +void f1a() +{ + std::for_each(a, b, + [](Something & b) + { + std::cout << "blah: " << *a; + }); +} + +void f1b() +{ + std::for_each(a, b, + [](int & b) -> foo + { + b += 3; + return b; + }); +} + +void f2() +{ + Invoke(a, b, + [&one, two](int *a, Something & b) + { + std::cout << "blah: " << *a; + }); +} + +void f3a() +{ + auto a = [] { + }; + auto b = []{ + return true; + }; +} + +void f3b() +{ + Invoke(a, b, + [&one, two] + { + std::cout << "blah: " << one << two; + }); +} + +void f3c() +{ + int a[]{}; +} + +void g1() +{ + auto a = [ = ](int* a, Something &b) { + std::cout << "blah: " << *a; + }; +} + +void g1a() +{ + std::for_each(a, b, [](Something& b){ + std::cout<<"blah: "<<*a; + }); +} + +void g1b() +{ + std::for_each(a, b, [] (int& b)->foo { + b+=3; return(b); + }); +} + +void g2() +{ + Invoke(a, b, + [&one, two] (int *a, Something&b){ + std::cout << "blah: " << *a; + }); +} + +void h1() +{ + []() -> int + { + return 33; + }(); + + []() noexcept ->int + { + return 33; + }(); +} + +void h2() +{ + [](int a) -> int + { + return a + 33; + }(21); + + [](int a) noexcept ->int + { + return a + 33; + }(21); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30767-lambda.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30767-lambda.cpp new file mode 100644 index 00000000..05e372e3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30767-lambda.cpp @@ -0,0 +1,114 @@ +void f1() +{ + auto a = + [=] (int *a, Something & b) + { + std::cout << "blah: " << *a; + }; +} + +void f1a() +{ + std::for_each(a, b, + [](Something & b) + { + std::cout << "blah: " << *a; + }); +} + +void f1b() +{ + std::for_each(a, b, + [](int & b) -> foo + { + b += 3; + return b; + }); +} + +void f2() +{ + Invoke(a, b, + [&one, two](int *a, Something & b) + { + std::cout << "blah: " << *a; + }); +} + +void f3a() +{ + auto a = [] { + }; + auto b = []{ + return true; + }; +} + +void f3b() +{ + Invoke(a, b, + [&one, two] + { + std::cout << "blah: " << one << two; + }); +} + +void f3c() +{ + int a[]{}; +} + +void g1() +{ + auto a = [ = ](int* a, Something &b) { + std::cout << "blah: " << *a; + }; +} + +void g1a() +{ + std::for_each(a, b, [](Something& b){ + std::cout<<"blah: "<<*a; + }); +} + +void g1b() +{ + std::for_each(a, b, [] (int& b)->foo { + b+=3; return(b); + }); +} + +void g2() +{ + Invoke(a, b, + [&one, two] (int *a, Something&b){ + std::cout << "blah: " << *a; + }); +} + +void h1() +{ + []() -> int + { + return 33; + }(); + + []() noexcept ->int + { + return 33; + }(); +} + +void h2() +{ + [](int a) -> int + { + return a + 33; + }(21); + + [](int a) noexcept ->int + { + return a + 33; + }(21); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30768-sp_cpp_lambda_fparen.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30768-sp_cpp_lambda_fparen.cpp new file mode 100644 index 00000000..e25d0496 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30768-sp_cpp_lambda_fparen.cpp @@ -0,0 +1,24 @@ +void test() +{ + []{}(); + []{ foo(); }(); + [x]{ foo(x); }(); + [](int x){ foo(x); }(42); + [y](int x){ foo(x, y); }(42); + bar([]{ return 1; }()); + bar([]{ return foo(); }()); + bar([x]{ return foo(x); }(42)); + bar([](int x){ return foo(x); }(42)); + bar([y](int x){ return foo(x, y); }(42)); + + [] {} (); + [] { foo(); } (); + [x] { foo(x); } (); + [] (int x){ foo(x); } (42); + [y] (int x){ foo(x, y); } (42); + bar([] { return 1; } ()); + bar([] { return foo(); } ()); + bar([x] { return foo(x); } (42)); + bar([] (int x){ return foo(x); } (42)); + bar([y] (int x){ return foo(x, y); } (42)); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30770-lambda.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30770-lambda.cpp new file mode 100644 index 00000000..5bce0d31 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30770-lambda.cpp @@ -0,0 +1,114 @@ +void f1() +{ + auto a = + [ = ](int *a, Something & b) + { + std::cout << "blah: " << *a; + }; +} + +void f1a() +{ + std::for_each(a, b, + [](Something & b) + { + std::cout << "blah: " << *a; + }); +} + +void f1b() +{ + std::for_each(a, b, + [](int & b) -> foo + { + b += 3; + return b; + }); +} + +void f2() +{ + Invoke(a, b, + [&one, two](int *a, Something & b) + { + std::cout << "blah: " << *a; + }); +} + +void f3a() +{ + auto a = [] { + }; + auto b = [] { + return true; + }; +} + +void f3b() +{ + Invoke(a, b, + [&one, two] + { + std::cout << "blah: " << one << two; + }); +} + +void f3c() +{ + int a[]{}; +} + +void g1() +{ + auto a = [ = ](int* a, Something &b) { + std::cout << "blah: " << *a; + }; +} + +void g1a() +{ + std::for_each(a, b, [](Something& b) { + std::cout<<"blah: "<<*a; + }); +} + +void g1b() +{ + std::for_each(a, b, [](int& b)->foo { + b+=3; return(b); + }); +} + +void g2() +{ + Invoke(a, b, + [&one, two](int *a, Something&b) { + std::cout << "blah: " << *a; + }); +} + +void h1() +{ + []() -> int + { + return 33; + }(); + + []() noexcept ->int + { + return 33; + }(); +} + +void h2() +{ + [](int a) -> int + { + return a + 33; + }(21); + + [](int a) noexcept ->int + { + return a + 33; + }(21); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30771-lambda.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30771-lambda.cpp new file mode 100644 index 00000000..acc5b530 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30771-lambda.cpp @@ -0,0 +1,114 @@ +void f1() +{ + auto a = + [=] (int *a, Something & b) + { + std::cout << "blah: " << *a; + }; +} + +void f1a() +{ + std::for_each(a, b, + [] (Something & b) + { + std::cout << "blah: " << *a; + }); +} + +void f1b() +{ + std::for_each(a, b, + [] (int & b) -> foo + { + b += 3; + return b; + }); +} + +void f2() +{ + Invoke(a, b, + [&one, two] (int *a, Something & b) + { + std::cout << "blah: " << *a; + }); +} + +void f3a() +{ + auto a = [] { + }; + auto b = [] { + return true; + }; +} + +void f3b() +{ + Invoke(a, b, + [&one, two] + { + std::cout << "blah: " << one << two; + }); +} + +void f3c() +{ + int a[]{}; +} + +void g1() +{ + auto a = [=] (int* a, Something &b) { + std::cout << "blah: " << *a; + }; +} + +void g1a() +{ + std::for_each(a, b, [] (Something& b) { + std::cout<<"blah: "<<*a; + }); +} + +void g1b() +{ + std::for_each(a, b, [] (int& b)->foo { + b+=3; return(b); + }); +} + +void g2() +{ + Invoke(a, b, + [&one, two] (int *a, Something&b) { + std::cout << "blah: " << *a; + }); +} + +void h1() +{ + [] () -> int + { + return 33; + }(); + + [] () noexcept ->int + { + return 33; + }(); +} + +void h2() +{ + [] (int a) -> int + { + return a + 33; + }(21); + + [] (int a) noexcept ->int + { + return a + 33; + }(21); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30772-lambda.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30772-lambda.cpp new file mode 100644 index 00000000..304e4d10 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30772-lambda.cpp @@ -0,0 +1,114 @@ +void f1() +{ + auto a = + [=](int *a, Something & b) + { + std::cout << "blah: " << *a; + }; +} + +void f1a() +{ + std::for_each(a, b, + [](Something & b) + { + std::cout << "blah: " << *a; + }); +} + +void f1b() +{ + std::for_each(a, b, + [](int & b) -> foo + { + b += 3; + return b; + }); +} + +void f2() +{ + Invoke(a, b, + [&one, two](int *a, Something & b) + { + std::cout << "blah: " << *a; + }); +} + +void f3a() +{ + auto a = []{ + }; + auto b = []{ + return true; + }; +} + +void f3b() +{ + Invoke(a, b, + [&one, two] + { + std::cout << "blah: " << one << two; + }); +} + +void f3c() +{ + int a[]{}; +} + +void g1() +{ + auto a = [=](int* a, Something &b){ + std::cout << "blah: " << *a; + }; +} + +void g1a() +{ + std::for_each(a, b, [](Something& b){ + std::cout<<"blah: "<<*a; + }); +} + +void g1b() +{ + std::for_each(a, b, [](int& b)->foo { + b+=3; return(b); + }); +} + +void g2() +{ + Invoke(a, b, + [&one, two](int *a, Something&b){ + std::cout << "blah: " << *a; + }); +} + +void h1() +{ + []() -> int + { + return 33; + }(); + + []() noexcept ->int + { + return 33; + }(); +} + +void h2() +{ + [](int a) -> int + { + return a + 33; + }(21); + + [](int a) noexcept ->int + { + return a + 33; + }(21); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30773-lambda.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30773-lambda.cpp new file mode 100644 index 00000000..f494244a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30773-lambda.cpp @@ -0,0 +1,114 @@ +void f1() +{ + auto a = + [=](int *a, Something & b) + { + std::cout << "blah: " << *a; + }; +} + +void f1a() +{ + std::for_each(a, b, + [](Something & b) + { + std::cout << "blah: " << *a; + }); +} + +void f1b() +{ + std::for_each(a, b, + [](int & b) -> foo + { + b += 3; + return b; + }); +} + +void f2() +{ + Invoke(a, b, + [&one, two](int *a, Something & b) + { + std::cout << "blah: " << *a; + }); +} + +void f3a() +{ + auto a = [] { + }; + auto b = [] { + return true; + }; +} + +void f3b() +{ + Invoke(a, b, + [&one, two] + { + std::cout << "blah: " << one << two; + }); +} + +void f3c() +{ + int a[]{}; +} + +void g1() +{ + auto a = [=](int* a, Something &b){ + std::cout << "blah: " << *a; + }; +} + +void g1a() +{ + std::for_each(a, b, [](Something& b){ + std::cout<<"blah: "<<*a; + }); +} + +void g1b() +{ + std::for_each(a, b, [](int& b)->foo { + b+=3; return(b); + }); +} + +void g2() +{ + Invoke(a, b, + [&one, two](int *a, Something&b){ + std::cout << "blah: " << *a; + }); +} + +void h1() +{ + []() -> int + { + return 33; + }(); + + []() noexcept ->int + { + return 33; + }(); +} + +void h2() +{ + [](int a) -> int + { + return a + 33; + }(21); + + [](int a) noexcept ->int + { + return a + 33; + }(21); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30774-lambda.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30774-lambda.cpp new file mode 100644 index 00000000..f494244a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30774-lambda.cpp @@ -0,0 +1,114 @@ +void f1() +{ + auto a = + [=](int *a, Something & b) + { + std::cout << "blah: " << *a; + }; +} + +void f1a() +{ + std::for_each(a, b, + [](Something & b) + { + std::cout << "blah: " << *a; + }); +} + +void f1b() +{ + std::for_each(a, b, + [](int & b) -> foo + { + b += 3; + return b; + }); +} + +void f2() +{ + Invoke(a, b, + [&one, two](int *a, Something & b) + { + std::cout << "blah: " << *a; + }); +} + +void f3a() +{ + auto a = [] { + }; + auto b = [] { + return true; + }; +} + +void f3b() +{ + Invoke(a, b, + [&one, two] + { + std::cout << "blah: " << one << two; + }); +} + +void f3c() +{ + int a[]{}; +} + +void g1() +{ + auto a = [=](int* a, Something &b){ + std::cout << "blah: " << *a; + }; +} + +void g1a() +{ + std::for_each(a, b, [](Something& b){ + std::cout<<"blah: "<<*a; + }); +} + +void g1b() +{ + std::for_each(a, b, [](int& b)->foo { + b+=3; return(b); + }); +} + +void g2() +{ + Invoke(a, b, + [&one, two](int *a, Something&b){ + std::cout << "blah: " << *a; + }); +} + +void h1() +{ + []() -> int + { + return 33; + }(); + + []() noexcept ->int + { + return 33; + }(); +} + +void h2() +{ + [](int a) -> int + { + return a + 33; + }(21); + + [](int a) noexcept ->int + { + return a + 33; + }(21); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30775-lambda.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30775-lambda.cpp new file mode 100644 index 00000000..80e9c8f9 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30775-lambda.cpp @@ -0,0 +1,114 @@ +void f1() +{ + auto a = + [=](int *a, Something & b) + { + std::cout << "blah: " << *a; + }; +} + +void f1a() +{ + std::for_each(a, b, + [](Something & b) + { + std::cout << "blah: " << *a; + }); +} + +void f1b() +{ + std::for_each(a, b, + [](int & b) -> foo + { + b += 3; + return b; + }); +} + +void f2() +{ + Invoke(a, b, + [&one, two](int *a, Something & b) + { + std::cout << "blah: " << *a; + }); +} + +void f3a() +{ + auto a = [] { + }; + auto b = [] { + return true; + }; +} + +void f3b() +{ + Invoke(a, b, + [&one, two] + { + std::cout << "blah: " << one << two; + }); +} + +void f3c() +{ + int a[]{}; +} + +void g1() +{ + auto a = [=](int* a, Something &b) { + std::cout << "blah: " << *a; + }; +} + +void g1a() +{ + std::for_each(a, b, [](Something& b) { + std::cout<<"blah: "<<*a; + }); +} + +void g1b() +{ + std::for_each(a, b, [](int& b)->foo { + b+=3; return(b); + }); +} + +void g2() +{ + Invoke(a, b, + [&one, two](int *a, Something&b) { + std::cout << "blah: " << *a; + }); +} + +void h1() +{ + []() -> int + { + return 33; + }(); + + []() noexcept ->int + { + return 33; + }(); +} + +void h2() +{ + [](int a) -> int + { + return a + 33; + }(21); + + [](int a) noexcept ->int + { + return a + 33; + }(21); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30776-sp_cpp_lambda_fparen.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30776-sp_cpp_lambda_fparen.cpp new file mode 100644 index 00000000..e0c1985d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30776-sp_cpp_lambda_fparen.cpp @@ -0,0 +1,24 @@ +void test() +{ + []{}(); + []{ foo(); }(); + [x]{ foo(x); }(); + [](int x){ foo(x); }(42); + [y](int x){ foo(x, y); }(42); + bar([]{ return 1; }()); + bar([]{ return foo(); }()); + bar([x]{ return foo(x); }(42)); + bar([](int x){ return foo(x); }(42)); + bar([y](int x){ return foo(x, y); }(42)); + + []{}(); + []{ foo(); }(); + [x]{ foo(x); }(); + [](int x){ foo(x); }(42); + [y](int x){ foo(x, y); }(42); + bar([]{ return 1; }()); + bar([]{ return foo(); }()); + bar([x]{ return foo(x); }(42)); + bar([](int x){ return foo(x); }(42)); + bar([y](int x){ return foo(x, y); }(42)); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30777-sp_cpp_lambda_fparen.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30777-sp_cpp_lambda_fparen.cpp new file mode 100644 index 00000000..f882a211 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30777-sp_cpp_lambda_fparen.cpp @@ -0,0 +1,24 @@ +void test() +{ + [] {} (); + [] { foo(); } (); + [x] { foo(x); } (); + [] (int x){ foo(x); } (42); + [y] (int x){ foo(x, y); } (42); + bar([] { return 1; } ()); + bar([] { return foo(); } ()); + bar([x] { return foo(x); } (42)); + bar([] (int x){ return foo(x); } (42)); + bar([y] (int x){ return foo(x, y); } (42)); + + [] {} (); + [] { foo(); } (); + [x] { foo(x); } (); + [] (int x){ foo(x); } (42); + [y] (int x){ foo(x, y); } (42); + bar([] { return 1; } ()); + bar([] { return foo(); } ()); + bar([x] { return foo(x); } (42)); + bar([] (int x){ return foo(x); } (42)); + bar([y] (int x){ return foo(x, y); } (42)); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30780-lambda_in_one_liner.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30780-lambda_in_one_liner.cpp new file mode 100644 index 00000000..c740c4bd --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30780-lambda_in_one_liner.cpp @@ -0,0 +1,6 @@ +void bar(); + +struct foo +{ + foo() { []{ bar(); }(); } +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30781-lambda_brace_list.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30781-lambda_brace_list.cpp new file mode 100644 index 00000000..8626f5af --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30781-lambda_brace_list.cpp @@ -0,0 +1,9 @@ +template<typename T, typename U> +auto add(T t, U u) -> decltype(t + u) { return t + u; } + +int main() +{ + auto f1 = [&]() { return 1; }; + auto f2 = [&]() -> decltype(auto) { return 2; }; + string s1{'a', 'b'}; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30790-Issue_2795.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30790-Issue_2795.cpp new file mode 100644 index 00000000..6cb7e112 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30790-Issue_2795.cpp @@ -0,0 +1,3 @@ +void SnRequestTracefork::onCurlTestError(QProcess::ProcessError _error) { + myerror(QString("Curl process failed with error %1").arg(_error)); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30791-Issue_3203.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30791-Issue_3203.cpp new file mode 100644 index 00000000..519d29dd --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30791-Issue_3203.cpp @@ -0,0 +1,14 @@ +#include <vector>
+
+class A
+{
+public:
+ int a;
+ int b;
+
+ std::vector<int*> v =
+ {
+ &a,
+ &b
+ };
+};
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30800-align-star-amp-pos.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30800-align-star-amp-pos.cpp new file mode 100644 index 00000000..dc988ce1 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30800-align-star-amp-pos.cpp @@ -0,0 +1,47 @@ + +/** First, the typedefs */ +typedef int MY_INT; +typedef int* MY_INTP; +typedef int& MY_INTR; +typedef CFoo& foo_ref_t; +typedef int (* foo_t)(void* bar); +typedef const char* (* somefunc_t)(void* barstool); + +/* Now, the types */ +struct foo1 { + unsigned int d_ino; + const char* d_reclen; + unsigned short d_namlen; + char d_name[1]; + CFoo& fref; +}; + +struct foo { int a; char* b }; + +static int idx; +static const char** tmp; +CFoo& fref; + +static char buf[64]; +static unsigned long how_long; +// comment +static int** tmp; +static char buf[64]; + + +void bar(int someval, + void* puser, + const char* filename, + struct willy* the_list, + int list_len) +{ + int idx; + const char** tmp; + char buf[64]; + CFoo& fref; + + unsigned long how_long; + + return(-1); +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30801-align-star-amp-pos.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30801-align-star-amp-pos.cpp new file mode 100644 index 00000000..c23b0d4a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30801-align-star-amp-pos.cpp @@ -0,0 +1,47 @@ + +/** First, the typedefs */ +typedef int MY_INT; +typedef int *MY_INTP; +typedef int &MY_INTR; +typedef CFoo &foo_ref_t; +typedef int (*foo_t)(void *bar); +typedef const char *(*somefunc_t)(void *barstool); + +/* Now, the types */ +struct foo1 { + unsigned int d_ino; + const char *d_reclen; + unsigned short d_namlen; + char d_name[1]; + CFoo &fref; +}; + +struct foo { int a; char *b }; + +static int idx; +static const char **tmp; +CFoo &fref; + +static char buf[64]; +static unsigned long how_long; +// comment +static int **tmp; +static char buf[64]; + + +void bar(int someval, + void *puser, + const char *filename, + struct willy *the_list, + int list_len) +{ + int idx; + const char **tmp; + char buf[64]; + CFoo &fref; + + unsigned long how_long; + + return(-1); +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30802-align-star-amp-pos.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30802-align-star-amp-pos.cpp new file mode 100644 index 00000000..cf2bff2d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30802-align-star-amp-pos.cpp @@ -0,0 +1,47 @@ + +/** First, the typedefs */ +typedef int MY_INT; +typedef int *MY_INTP; +typedef int &MY_INTR; +typedef CFoo &foo_ref_t; +typedef int (*foo_t)(void *bar); +typedef const char *(*somefunc_t)(void *barstool); + +/* Now, the types */ +struct foo1 { + unsigned int d_ino; + const char *d_reclen; + unsigned short d_namlen; + char d_name[1]; + CFoo &fref; +}; + +struct foo { int a; char *b }; + +static int idx; +static const char **tmp; +CFoo &fref; + +static char buf[64]; +static unsigned long how_long; +// comment +static int **tmp; +static char buf[64]; + + +void bar(int someval, + void *puser, + const char *filename, + struct willy *the_list, + int list_len) +{ + int idx; + const char **tmp; + char buf[64]; + CFoo &fref; + + unsigned long how_long; + + return(-1); +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30803-bug_1403.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30803-bug_1403.cpp new file mode 100644 index 00000000..209c0173 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30803-bug_1403.cpp @@ -0,0 +1,6 @@ +int main() +{ + float x; + float y; + float result(1 + x * y); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30805-ptr-star.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30805-ptr-star.cpp new file mode 100644 index 00000000..fcefa84f --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30805-ptr-star.cpp @@ -0,0 +1,70 @@ +int dx = m_ClipBox.GetWidth() * GetZoom(); + +m_ClipBox.m_Pos.y = PaintClipBox.y * GetZoom(); + +int* i; +char* i; + +int MyFunc(std::string& s, char*) { + char* c = const_cast<char*>(s.c_str()); +} + +int YerFunc(std::string& s, char**) { + char** c; + int a = b[0] * c; +} + +int* X(int* i, int*); + +int* i = &a; +int* i = *b; +int* i = &*c; + +int* Aclass::X(int* i, int*); + +class Aclass { +int* X(int* i, int*); +} +extern "C" { +int foo1(int* a); +int foo2(sometype* a); +} +int bar1(int* a); +int bar2(sometype* a); + +struct X +{ + int* a; // 3:5 + + int f() + { + return *b; // 7:8 + } + int g() + { + return *c; // 11:8 + } +}; + +int* const i; +int* static i; + +static auto Func1(Model* model) -> Color*; +static auto Func1(Model* model) -> Color* { + return nullptr; +} + +auto Func2(Model* model) -> Color* const; +auto Func2(Model* model) -> Color* const { + return nullptr; +} + +auto Func3(Model* model) -> Color**; +auto Func3(Model* model) -> Color** { + return nullptr; +} + +auto Func4(Model* model) -> Color** const; +auto Func4(Model* model) -> Color** const { + return nullptr; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30806-ptr-star.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30806-ptr-star.cpp new file mode 100644 index 00000000..76659df9 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30806-ptr-star.cpp @@ -0,0 +1,70 @@ +int dx = m_ClipBox.GetWidth() * GetZoom(); + +m_ClipBox.m_Pos.y = PaintClipBox.y * GetZoom(); + +int *i; +char *i; + +int MyFunc(std::string &s, char *) { + char *c = const_cast<char *>(s.c_str()); +} + +int YerFunc(std::string &s, char **) { + char **c; + int a = b[0] * c; +} + +int *X(int *i, int *); + +int *i = &a; +int *i = *b; +int *i = &*c; + +int *Aclass::X(int *i, int *); + +class Aclass { +int *X(int *i, int *); +} +extern "C" { +int foo1(int *a); +int foo2(sometype *a); +} +int bar1(int *a); +int bar2(sometype *a); + +struct X +{ + int *a; // 3:5 + + int f() + { + return *b; // 7:8 + } + int g() + { + return *c; // 11:8 + } +}; + +int *const i; +int *static i; + +static auto Func1(Model *model) -> Color *; +static auto Func1(Model *model) -> Color *{ + return nullptr; +} + +auto Func2(Model *model) -> Color *const; +auto Func2(Model *model) -> Color *const { + return nullptr; +} + +auto Func3(Model *model) -> Color **; +auto Func3(Model *model) -> Color **{ + return nullptr; +} + +auto Func4(Model *model) -> Color **const; +auto Func4(Model *model) -> Color **const { + return nullptr; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30807-ptr-star.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30807-ptr-star.cpp new file mode 100644 index 00000000..55478e3f --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30807-ptr-star.cpp @@ -0,0 +1,70 @@ +int dx = m_ClipBox.GetWidth() * GetZoom(); + +m_ClipBox.m_Pos.y = PaintClipBox.y * GetZoom(); + +int *i; +char *i; + +int MyFunc(std::string& s, char*) { + char *c = const_cast<char*>(s.c_str()); +} + +int YerFunc(std::string& s, char**) { + char **c; + int a = b[0] * c; +} + +int* X(int *i, int*); + +int *i = &a; +int *i = *b; +int *i = &*c; + +int* Aclass::X(int *i, int*); + +class Aclass { +int* X(int *i, int*); +} +extern "C" { +int foo1(int *a); +int foo2(sometype *a); +} +int bar1(int *a); +int bar2(sometype *a); + +struct X +{ + int *a; // 3:5 + + int f() + { + return *b; // 7:8 + } + int g() + { + return *c; // 11:8 + } +}; + +int* const i; +int* static i; + +static auto Func1(Model *model) -> Color*; +static auto Func1(Model *model) -> Color* { + return nullptr; +} + +auto Func2(Model *model) -> Color* const; +auto Func2(Model *model) -> Color* const { + return nullptr; +} + +auto Func3(Model *model) -> Color**; +auto Func3(Model *model) -> Color** { + return nullptr; +} + +auto Func4(Model *model) -> Color** const; +auto Func4(Model *model) -> Color** const { + return nullptr; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30808-ptr-star.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30808-ptr-star.cpp new file mode 100644 index 00000000..68cb8151 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30808-ptr-star.cpp @@ -0,0 +1,70 @@ +int dx = m_ClipBox.GetWidth() * GetZoom(); + +m_ClipBox.m_Pos.y = PaintClipBox.y * GetZoom(); + +int* i; +char*i; + +int MyFunc(std::string& s, char*) { + char *c = const_cast<char*>(s.c_str()); +} + +int YerFunc(std::string& s, char**) { + char **c; + int a = b[0] * c; +} + +int*X(int *i, int*); + +int *i = &a; +int *i = *b; +int *i = &*c; + +int *Aclass::X(int* i, int *); + +class Aclass { +int *X(int* i, int *); +} +extern "C" { +int foo1(int *a); +int foo2(sometype *a); +} +int bar1(int *a); +int bar2(sometype *a); + +struct X +{ + int * a;// 3:5 + + int f() + { + return *b; // 7:8 + } + int g() + { + return *c; // 11:8 + } +}; + +int * const i; +int * static i; + +static auto Func1(Model *model) -> Color*; +static auto Func1(Model *model) -> Color* { + return nullptr; +} + +auto Func2(Model *model) -> Color* const; +auto Func2(Model *model) -> Color* const { + return nullptr; +} + +auto Func3(Model *model) -> Color**; +auto Func3(Model *model) -> Color** { + return nullptr; +} + +auto Func4(Model *model) -> Color** const; +auto Func4(Model *model) -> Color** const { + return nullptr; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30809-bug_1289.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30809-bug_1289.cpp new file mode 100644 index 00000000..42663477 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30809-bug_1289.cpp @@ -0,0 +1,3 @@ +extern "C" void __declspec(dllexport) GetAccountNameAndDomain(HWND /*hwndParent*/, int string_size, TCHAR * variables, stack_t** stacktop, extra_parameters* /*extra*/) +{ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30810-ptr-star.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30810-ptr-star.cpp new file mode 100644 index 00000000..fa88b0bc --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30810-ptr-star.cpp @@ -0,0 +1,76 @@ +int dx = m_ClipBox.GetWidth() * GetZoom(); + +m_ClipBox.m_Pos.y = PaintClipBox.y * GetZoom(); + +int *i; +char *i; + +int MyFunc(std::string& s, char *) +{ + char *c = const_cast<char *>(s.c_str()); +} + +int YerFunc(std::string& s, char **) +{ + char **c; + int a = b[0] * c; +} + +int *X(int *i, int *); + +int *i = &a; +int *i = *b; +int *i = &*c; + +int *Aclass::X(int *i, int *); + +class Aclass { + int *X(int *i, int *); +} +extern "C" { +int foo1(int *a); +int foo2(sometype *a); +} +int bar1(int *a); +int bar2(sometype *a); + +struct X +{ + int *a; // 3:5 + + int f() + { + return (*b); // 7:8 + } + int g() + { + return (*c); // 11:8 + } +}; + +int *const i; +int *static i; + +static auto Func1(Model *model) -> Color *; +static auto Func1(Model *model) -> Color * +{ + return(nullptr); +} + +auto Func2(Model *model) -> Color *const; +auto Func2(Model *model) -> Color *const +{ + return(nullptr); +} + +auto Func3(Model *model) -> Color **; +auto Func3(Model *model) -> Color ** +{ + return(nullptr); +} + +auto Func4(Model *model) -> Color **const; +auto Func4(Model *model) -> Color **const +{ + return(nullptr); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30811-misc3.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30811-misc3.cpp new file mode 100644 index 00000000..9ca06c3c --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30811-misc3.cpp @@ -0,0 +1,21 @@ +// When constructing an object there should not be any space between the & and the variable name: + +MyClass my1(foo, &bar); +MyClass my2(foo, bar); +MyClass my3(foo, bar + 3); +MyClass my4(42); +MyClass my5(foo(), bar); +MyClass my6(int foo, int& bar); +MyClass my7(const int foo, int& bar); + + +//When using references inside of casts there is also an additional space after the &: + +MyClass& myInst = static_cast<MyClass&>(otherInst); + + +// When using the qt-specific signals and slots the pointer star is separated from the type with a space: + +connect(&mapper, SIGNAL(mapped(QWidget*)), this, SLOT(onSomeEvent(QWidget*))); + +extern int select(int __nfds, fd_set*__restrict __readfds, fd_set*__restrict __writefds, fd_set*__restrict __exceptfds, struct timeval*__restrict __timeout); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30812-misc4.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30812-misc4.cpp new file mode 100644 index 00000000..5ddaffb0 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30812-misc4.cpp @@ -0,0 +1,36 @@ +struct X +{ + void operator deleteme(void *); + void deallocate(int *p) + { + operator delete((void *)p); + delete((void *)q); + } +}; + +int f(bool b) +{ + typedef int mytype; + if (b) + { + return(int(42.0)); + } + else + { + return(mytype(42.0)); + } +} + +struct X +{ + double f(int n) + { + return(double(n)); + } +}; + +inline value_type operator ()() const +{ + return(double(rnd32()) * (0.5 / 0x80000000)); +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30813-misc5.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30813-misc5.cpp new file mode 100644 index 00000000..e8ffaf27 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30813-misc5.cpp @@ -0,0 +1,13 @@ +typedef std::list<StreamedData *>::iterator iterator; +double foo() +{ + if (a<bar()> c) + { + throw int(); + return(double()); + } + call_a_function(42, + double(-1), + "charray"); + return(foo(n)); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30814-misc6.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30814-misc6.cpp new file mode 100644 index 00000000..95cc0383 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30814-misc6.cpp @@ -0,0 +1,3 @@ +#include <vector> +void f(std::vector<int> * vip, std::vector<int> & vir); + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30815-cmt-reflow.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30815-cmt-reflow.cpp new file mode 100644 index 00000000..8bd50283 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30815-cmt-reflow.cpp @@ -0,0 +1,53 @@ + +typedef enum stuff +{ + Value1 = 0x00000400, /* Just a comment for the value */ + Value2 = 0x00000800, /* A much longer comment that needs + * to be truncated to fit within a + * set character width. In this + * case, its 80 characters so two + * truncates are required. */ +} JustAnEnum; + +/* this is another comment that is meant to exceed the code + * width so that it can be wrapped + * and combined to see how that works. */ + +/* this is another comment that is meant to exceed the code + * width so that it can be wrapped + * and combined to see how that works. */ + +/* Line A */ + +/* Line 1 + * line 2 + * line 3 + * line 4 + */ + +int cnt; /* This is a counter variable with a long + * comment. this should cause the comment to be + * wrapped. */ + +/** + * Multi-line comment + */ +void foo(void) +{ +/** + * Multi-line comment + */ + int idx; + /** + * Multi-line comment + */ +} + +/* Start Change #95 + * INITIALIZE Variable(contExtnElgInd); /# Change #61 #/ + * /# Start Change #35 #/ + */ + +/** + * OneBigWordThatCannotBeSplitYetExceedsTheCommentWidthSettingSoThatWrappingShouldBeAttempted. + */ diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30816-for_long.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30816-for_long.cpp new file mode 100644 index 00000000..5483d4c8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30816-for_long.cpp @@ -0,0 +1,12 @@ +void +foo() +{ + for (std::map<std::string, std::string>::iterator it = + m_stat_http_conn_total.m_stat_response_codes.begin(); + it != m_stat_http_conn_total.m_stat_response_codes.end(); + ++i) + { + bar(it); + } +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30817-cmt-cpp-cont.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30817-cmt-cpp-cont.cpp new file mode 100644 index 00000000..9acbac58 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30817-cmt-cpp-cont.cpp @@ -0,0 +1,17 @@ +#include "foo.h" + +// +// plshade z xmin xmax ymin ymax \ +// sh_min sh_max sh_cmap sh_color sh_width \ +// min_col min_wid max_col max_wid \ +// rect [[pltr x y] | NULL ] [wrap] +//-------------------------------------------------------------------------- + +void foo() +{ + // plshade z xmin xmax ymin ymax \ + // sh_min sh_max sh_cmap sh_color sh_width \ + // min_col min_wid max_col max_wid \ + // rect [[pltr x y] | NULL ] [wrap] + //-------------------------------------------------------------------------- +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30818-bug_1169.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30818-bug_1169.cpp new file mode 100644 index 00000000..b1138a57 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30818-bug_1169.cpp @@ -0,0 +1,33 @@ +class MyClass +{ +public: + virtual void f1ooooooooooooooo(const int bar); + virtual void f2oooooooooooooooo(const int bar); + virtual void f3ooooooooooooooooo( + const int bar); + virtual void f4oooooooooooooooooo( + const int bar); + virtual void f5ooooooooooooooooooo( + const int bar); +}; + +virtual void f1oooooooooooooooooo(const int bar); +virtual void f2ooooooooooooooooooo(const int bar); +virtual void f3oooooooooooooooooooo( + const int bar); +virtual void f4ooooooooooooooooooooo( + const int bar); +virtual void f5oooooooooooooooooooooo( + const int bar); + +void foo() +{ + std::string s1 = "f1oooooooooooooooooooooooo"; + std::string s2 = "f2ooooooooooooooooooooooooo"; + std::string s3 = + "f3oooooooooooooooooooooooooo"; + std::string s4 = + "f4ooooooooooooooooooooooooooo"; + std::string s5 = + "f5oooooooooooooooooooooooooooo"; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30819-bug_1170.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30819-bug_1170.cpp new file mode 100644 index 00000000..18e029cb --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30819-bug_1170.cpp @@ -0,0 +1,8 @@ +template<class CLASS_PARAMETER_0, class CLASS_PARAMETER_1, class CLASS_PARAMETER_2, class CLASS_PARAMETER_3, class CLASS_PARAMETER_4, + class CLASS_PARAMETER_5> +class MyTemplateClass +{ +public: + MyTemplateClass<my::super::cool::_and::fancy::type, my::super::cool::_and::fancy::type, my::super::cool::_and::fancy::type, + my::super::cool::_and::fancy::type, my::super::cool::_and::fancy::type, my::super::cool::_and::fancy::type> foo(); +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30820-pp-define-indent.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30820-pp-define-indent.cpp new file mode 100644 index 00000000..0d7892a2 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30820-pp-define-indent.cpp @@ -0,0 +1,35 @@ + +#define outpsize +#define some(f) \ + foo(f) + +class CRC +{ +public: + int foo; +// Initial CRC Start Value + #define 24BITCRC ((ULONG) 0x00864CFB) // This line is not aligned with the other lines + char ch; + #define MULTI LINE DEFINE \ + in column 0 \ + that spans +//// Operations //// +public: + ... +} + +{ +#if defined(WIN32) + SYSTEMTIME st; + DWORD ThreadId; +#else + struct timeval mytv; + struct tm *mytm; + pid_t ProcessId; +#endif + +#if SOME COND + (void)loop; +#endif +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30821-pp_indent_case.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30821-pp_indent_case.cpp new file mode 100644 index 00000000..70b1b9c7 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30821-pp_indent_case.cpp @@ -0,0 +1,23 @@ +// Example for case in a preprocesser statement
+// Config uses more than tested option, uses:
+// pp_if_indent_code = true to enable preprocesser indent
+// pp_indent_case = false to override preprocessor indent for case blocks
+switch(...)
+{
+case 1:
+case 2:
+{
+ int v;
+ ...
+}
+break;
+
+#if (USE_FIVE)
+case 3:
+ doFive();
+ break;
+#endif
+
+default:
+ break;
+}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30822-pp_indent_brace.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30822-pp_indent_brace.cpp new file mode 100644 index 00000000..d1decdf6 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30822-pp_indent_brace.cpp @@ -0,0 +1,24 @@ +// Example for preprocessor statement in a function definition
+// Config uses more than tested option, uses:
+// pp_if_indent_code = 1 to enable preprocesser indent
+// pp_indent_brace = 0 to override preprocessor indent for braces
+MyClass::MyClass()
+{
+ if(isSomething)
+ {
+ DoSomething();
+ }
+
+#if (USE_FIVE)
+ {
+ DoSomethingAlso();
+ }
+#endif
+
+#if (USE_SIX)
+ {
+ Six mySix;
+ DoSomethingWithSix(mySix);
+ }
+#endif
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30823-pp_indent_func_def.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30823-pp_indent_func_def.cpp new file mode 100644 index 00000000..b01c6bbe --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30823-pp_indent_func_def.cpp @@ -0,0 +1,11 @@ +// Example of function definitions inside of preprocessor statements
+// Config uses more than tested option, uses:
+// pp_if_indent_code = true to enable preprocesser indent
+// pp_indent_func_def = false to override preprocessor indent for function definitions
+int x = 1;
+#if (USE_AWESOME_FUNCTIONS)
+void MyClass::SomeAwesomeFunction()
+{
+ DoSomethingInAFunction();
+}
+#endif
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30824-pp_indent_extern.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30824-pp_indent_extern.cpp new file mode 100644 index 00000000..995db611 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30824-pp_indent_extern.cpp @@ -0,0 +1,14 @@ +// Example for extern "C" blocks inside preprocessor statements
+// Config uses more than tested option, uses:
+// pp_if_indent_code = true to enable preprocesser indent
+// pp_indent_extern = false to override preprocessor indent for braces
+int x = 1;
+#ifdef __cplusplus
+extern "C" {
+
+void some_c_function
+(
+ void
+);
+}
+#endif
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30825-Issue_1966.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30825-Issue_1966.cpp new file mode 100644 index 00000000..12a8084b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30825-Issue_1966.cpp @@ -0,0 +1,2 @@ +#define FLAG1 0x101 /* struct foo should not be used. + The struct is unsafe */ diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30826-Issue_2319.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30826-Issue_2319.cpp new file mode 100644 index 00000000..8c0ae3e9 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30826-Issue_2319.cpp @@ -0,0 +1,2 @@ +using AbstractLinkPtr = AbstractLink*; +using AbstractLinkPtrPtr = AbstractLink**; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30827-Issue_1167.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30827-Issue_1167.cpp new file mode 100644 index 00000000..6410326c --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30827-Issue_1167.cpp @@ -0,0 +1,4 @@ +typedef ::foo::moon::extra::common::super::VeryLongClassName < + ::foo::moon::extra::common::super::ISuperNice, + ::foo::moon::extra::common::super::NiceStoryAboutTheSea, + ::foo::moon::extra::common::super::TheVeryLastParameter> AVeryLongNameForDemonstration; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30828-bug_1691.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30828-bug_1691.cpp new file mode 100644 index 00000000..e93f7f74 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30828-bug_1691.cpp @@ -0,0 +1,14 @@ +#include <string> + +std::string foo() +{ + return std::string{"abc"}; +} +int main() +{ + const std::string&& name1 = foo(); + std::string&& name2 = foo(); + + const auto&& name3 = foo(); + auto&& name4 = foo(); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30829-Issue_2726.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30829-Issue_2726.cpp new file mode 100644 index 00000000..bb7f1d4b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30829-Issue_2726.cpp @@ -0,0 +1,13 @@ +VIEW_CONTROLLER_MACRO(ThreadButton) +UIViewController *MSGCreate(MBAMailbox *mailbox, NSNumber *threadKey); + + +NS_SWIFT_NAME(Create(String)) +Controller *create(NSString *str); + + +MACRO_FUNCTION +Object *create( NSString *str, NSDictionary<NSString *, NSArray *> *data, string **str) +{ + return nullptr; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30830-kw_subst.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30830-kw_subst.cpp new file mode 100644 index 00000000..47084a7e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30830-kw_subst.cpp @@ -0,0 +1,82 @@ +/** + * @file kw_subst.cpp + * Description + * + * $Id$ + */ +#include <string> + +/** + * CLASS: CFoo + * TODO: DESCRIPTION + */ +class CFoo +{ +int foo1(int arg); +int foo2(); +/** + * CLASS: CFoo + * METHOD: foo3 + * TODO: DESCRIPTION + * @param ch TODO + * @param xx TODO + * @return TODO + */ +int foo3(char ch, int xx) +{ +} +}; + +/** + * CLASS: CFoo + * METHOD: foo1 + * TODO: DESCRIPTION + * @param arg TODO + * @param arg2 TODO + * @return TODO + */ +int CFoo::foo1(int arg, int arg2) +{ +} + +/** + * CLASS: CFoo + * METHOD: foo2 + * TODO: DESCRIPTION + * @return TODO + */ +int CFoo::foo2() +{ +} + +/** + * CLASS: CFoo + * METHOD: operator + + * TODO: DESCRIPTION + * @return TODO + */ +int CFoo::operator +() +{ +} + +/** + * CLASS: $(fclass) + * METHOD: func + * TODO: DESCRIPTION + * @return TODO + */ +map<string, int> func() +{ + // some codes +} + +/** + * CLASS: $(fclass) + * METHOD: some_func + * TODO: DESCRIPTION + * @return TODO + */ +int some_func(void) +{ +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30831-kw_subst2.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30831-kw_subst2.cpp new file mode 100644 index 00000000..b5e58eac --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30831-kw_subst2.cpp @@ -0,0 +1,78 @@ +/** + * @file kw_subst2.cpp + * Description + * + * $Id$ + */ +#include <string> + +namespace bar +{ + + /** + * CLASS: CFoo + * TODO: DESCRIPTION + */ + class CFoo + { + int foo1(int arg); +private: + /** + * foo2 + * TODO: DESCRIPTION + * @return TODO + */ + int foo2() + { + } + }; + + /** + * foo1 + * TODO: DESCRIPTION + * @param arg TODO + * @param arg2 TODO + * @return TODO + */ + int CFoo::foo1(int arg, char arg2) + { + } + + /** + * foo2 + * TODO: DESCRIPTION + * @return TODO + */ + int CFoo::foo2() + { + } + + /** + * operator + + * TODO: DESCRIPTION + * @return TODO + */ + int CFoo::operator +() + { + } + + /** + * func + * TODO: DESCRIPTION + * @return TODO + */ + map<string, int> func() + { + // some codes + } + + /** + * some_func + * TODO: DESCRIPTION + * @return TODO + */ + int some_func(void) + { + } + +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30832-kw_subst.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30832-kw_subst.cpp new file mode 100644 index 00000000..47084a7e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30832-kw_subst.cpp @@ -0,0 +1,82 @@ +/** + * @file kw_subst.cpp + * Description + * + * $Id$ + */ +#include <string> + +/** + * CLASS: CFoo + * TODO: DESCRIPTION + */ +class CFoo +{ +int foo1(int arg); +int foo2(); +/** + * CLASS: CFoo + * METHOD: foo3 + * TODO: DESCRIPTION + * @param ch TODO + * @param xx TODO + * @return TODO + */ +int foo3(char ch, int xx) +{ +} +}; + +/** + * CLASS: CFoo + * METHOD: foo1 + * TODO: DESCRIPTION + * @param arg TODO + * @param arg2 TODO + * @return TODO + */ +int CFoo::foo1(int arg, int arg2) +{ +} + +/** + * CLASS: CFoo + * METHOD: foo2 + * TODO: DESCRIPTION + * @return TODO + */ +int CFoo::foo2() +{ +} + +/** + * CLASS: CFoo + * METHOD: operator + + * TODO: DESCRIPTION + * @return TODO + */ +int CFoo::operator +() +{ +} + +/** + * CLASS: $(fclass) + * METHOD: func + * TODO: DESCRIPTION + * @return TODO + */ +map<string, int> func() +{ + // some codes +} + +/** + * CLASS: $(fclass) + * METHOD: some_func + * TODO: DESCRIPTION + * @return TODO + */ +int some_func(void) +{ +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30840-nl_func_type_name.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30840-nl_func_type_name.cpp new file mode 100644 index 00000000..a4302001 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30840-nl_func_type_name.cpp @@ -0,0 +1,79 @@ + +// zero +// one +// two +// three +void foo(void); + +struct A +{ +public: + long_complicated_type f(); + A& operator+(const A& other); +}; + +A& A::operator+(const A& other) +{ +} + +B operator+(const B& other) +{ +} + +B foo(const B& other) +{ +} + +class A +{ +public: +explicit A(int); +int aFunct() { + return a; +} +int bFunc(); +}; + +// Another file +int A::bFunc() +{ +// some code +} + +template<typename T> +typename Foo<T>::Type Foo<T>::Func() +{ +} + +void Foo::bar() { +} + +namespace foo { +Foo::Foo() { +} +} + +Foo::~Foo() { +} + +class Object +{ +~Object(void); +}; + +template <class T> +void SampleClassTemplate<T>::connect() +{ +} + +template <> +inline void bar<MyType>(MyType r) +{ + foo(r); +} + +template <T> +inline void baz<>(T r) +{ + foo(r); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30841-nl_func_type_name.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30841-nl_func_type_name.cpp new file mode 100644 index 00000000..5997a5c3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30841-nl_func_type_name.cpp @@ -0,0 +1,94 @@ + +// zero +// one +// two +// three +void +foo(void); + +struct A +{ +public: + long_complicated_type + f(); + A& + operator+(const A& other); +}; + +A& +A::operator+(const A& other) +{ +} + +B +operator+(const B& other) +{ +} + +B +foo(const B& other) +{ +} + +class A +{ +public: +explicit +A(int); +int +aFunct() { + return a; +} +int +bFunc(); +}; + +// Another file +int +A::bFunc() +{ +// some code +} + +template<typename T> +typename Foo<T>::Type +Foo<T>::Func() +{ +} + +void +Foo::bar() { +} + +namespace foo { +Foo::Foo() { +} +} + +Foo::~Foo() { +} + +class Object +{ +~Object(void); +}; + +template <class T> +void +SampleClassTemplate<T>::connect() +{ +} + +template <> +inline void +bar<MyType>(MyType r) +{ + foo(r); +} + +template <T> +inline void +baz<>(T r) +{ + foo(r); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30842-nl_func_type_name.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30842-nl_func_type_name.cpp new file mode 100644 index 00000000..a826af48 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30842-nl_func_type_name.cpp @@ -0,0 +1,89 @@ + +// zero +// one +// two +// three +void +foo(void); + +struct A +{ +public: + long_complicated_type f(); + A& operator+(const A& other); +}; + +A& +A::operator+(const A& other) +{ +} + +B +operator+(const B& other) +{ +} + +B +foo(const B& other) +{ +} + +class A +{ +public: +explicit A(int); +int aFunct() { + return a; +} +int bFunc(); +}; + +// Another file +int +A::bFunc() +{ +// some code +} + +template<typename T> +typename Foo<T>::Type +Foo<T>::Func() +{ +} + +void +Foo::bar() { +} + +namespace foo { +Foo::Foo() { +} +} + +Foo::~Foo() { +} + +class Object +{ +~Object(void); +}; + +template <class T> +void +SampleClassTemplate<T>::connect() +{ +} + +template <> +inline void +bar<MyType>(MyType r) +{ + foo(r); +} + +template <T> +inline void +baz<>(T r) +{ + foo(r); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30843-nl_func_type_name.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30843-nl_func_type_name.cpp new file mode 100644 index 00000000..b1ead857 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30843-nl_func_type_name.cpp @@ -0,0 +1,89 @@ + +// zero +// one +// two +// three +void foo(void); + +struct A +{ +public: + long_complicated_type f(); + A& operator+(const A& other); +}; + +A& +A::operator+(const A& other) +{ +} + +B +operator+(const B& other) +{ +} + +B +foo(const B& other) +{ +} + +class A +{ +public: +explicit A(int); +int +aFunct() { + return a; +} +int bFunc(); +}; + +// Another file +int +A::bFunc() +{ +// some code +} + +template<typename T> +typename Foo<T>::Type +Foo<T>::Func() +{ +} + +void +Foo::bar() { +} + +namespace foo { +Foo::Foo() { +} +} + +Foo::~Foo() { +} + +class Object +{ +~Object(void); +}; + +template <class T> +void +SampleClassTemplate<T>::connect() +{ +} + +template <> +inline void +bar<MyType>(MyType r) +{ + foo(r); +} + +template <T> +inline void +baz<>(T r) +{ + foo(r); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30844-Issue_2771.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30844-Issue_2771.cpp new file mode 100644 index 00000000..ab7c285f --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30844-Issue_2771.cpp @@ -0,0 +1,4 @@ +class CDiagnostic +{ + CDiagnostic& operator<<( int value_ ) { return ns::operator<<( *this, value_ ); } +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30845-deref.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30845-deref.cpp new file mode 100644 index 00000000..9705b51f --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30845-deref.cpp @@ -0,0 +1,15 @@ + +myNewValue = something[arrayNumber] * someOtherValue; +myNewValue = multidimentional[arrayNumber][anotherNumber] * someOtherValue; +myNewValue = noArrayVariableWorksFine * someOtherValue; + + +int func(int *thingy, + volatile int *arrayThingy[NUMBER]); + +int func(int *thingy, + volatile int *arrayThingy[NUMBER][anotherNumber]); + +int func(int *thingy, + volatile int *noArrayThingyWorksFine); + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30846-Issue_3197.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30846-Issue_3197.h new file mode 100644 index 00000000..76331aa3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30846-Issue_3197.h @@ -0,0 +1,4 @@ +vec_ & operator+=(vec_ &, const vec_ &); + + +int xyz(int a, int b); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30850-sp_cmt_cpp_start.cc b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30850-sp_cmt_cpp_start.cc new file mode 100644 index 00000000..9cc04a18 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30850-sp_cmt_cpp_start.cc @@ -0,0 +1,4 @@ +int main() { + return 0; // Just return from + // the function. +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30852-Issue_2138.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30852-Issue_2138.cpp new file mode 100644 index 00000000..3a8fa83c --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30852-Issue_2138.cpp @@ -0,0 +1,2 @@ +void funcName() const; +void ncName() override; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30853-noexcept.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30853-noexcept.cpp new file mode 100644 index 00000000..60f2edd4 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30853-noexcept.cpp @@ -0,0 +1 @@ +foo() noexcept; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30854-Issue_1703.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30854-Issue_1703.cpp new file mode 100644 index 00000000..af32d661 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30854-Issue_1703.cpp @@ -0,0 +1 @@ +#define NUM_LPM_TESTS ( sizeof(tests) / sizeof(tests[0]) ) diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30855-cpp_move.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30855-cpp_move.cpp new file mode 100644 index 00000000..cec9beb8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30855-cpp_move.cpp @@ -0,0 +1,2 @@ + +void Test(X&& val1, Y* val2); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30856-sp_cmt_cpp_region.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30856-sp_cmt_cpp_region.cpp new file mode 100644 index 00000000..dc9e4160 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30856-sp_cmt_cpp_region.cpp @@ -0,0 +1,9 @@ +// BEGIN real region + +int foo() +{ + int x = 0; //BEGIN not-region + return x; //END not-region +} + +// END real region diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30857-sp_cmt_cpp_region.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30857-sp_cmt_cpp_region.cpp new file mode 100644 index 00000000..29f75936 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30857-sp_cmt_cpp_region.cpp @@ -0,0 +1,9 @@ +//BEGIN real region + +int foo() +{ + int x = 0; // BEGIN not-region + return x; // END not-region +} + +//END real region diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30860-sf574.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30860-sf574.cpp new file mode 100644 index 00000000..58810404 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30860-sf574.cpp @@ -0,0 +1,13 @@ +class A : public B +{ + A& operator=(const A& other) + { + if (this == &other) return *this; + B::operator=(other); + if (this == &other) return *this; + B::opera(other); + copy(other); + return *this; + } +}; + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30870-cmt_insert.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30870-cmt_insert.cpp new file mode 100644 index 00000000..cf5ac204 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30870-cmt_insert.cpp @@ -0,0 +1,82 @@ +/** + * @file cmt_insert.cpp + * Description + * + * $Id$ + */ +#include <string> + +/** + * CLASS: CFoo + * TODO: DESCRIPTION + */ +class CFoo +{ +CFoo(int arg); +CFoo(char arg) { +} +~CFoo(); +int foo1(int arg); +int foo2(); +int foo3(char ch, int xx) +{ +} +}; + +CFoo::CFoo(int arg) { +} + +CFoo::~CFoo() { +} + +/** + * foo1 + * TODO: DESCRIPTION + * @param arg TODO + * @param arg2 TODO + * @return TODO + */ +int CFoo::foo1(int arg, int arg2) +{ +} + +/** + * foo2 + * TODO: DESCRIPTION + * @return TODO + */ +int CFoo::foo2() +{ +} + +/** + * operator + + * TODO: DESCRIPTION + * @return TODO + */ +int CFoo::operator +() +{ +} + +/** + * func + * TODO: DESCRIPTION + * @return TODO + */ +map<string, int> func() +{ + // some codes +} + +/** + * some_func + * TODO: DESCRIPTION + * @return TODO + */ +int some_func(void) +{ +} + +class some_class_declaration; + +int some_func_declaration(); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30871-cmt_insert.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30871-cmt_insert.cpp new file mode 100644 index 00000000..a169795a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30871-cmt_insert.cpp @@ -0,0 +1,106 @@ +/** + * @file cmt_insert.cpp + * Description + * + * $Id$ + */ +#include <string> + +/** + * CLASS: CFoo + * TODO: DESCRIPTION + */ +class CFoo +{ +CFoo(int arg); +/** + * CFoo + * TODO: DESCRIPTION + * @param arg TODO + * @return TODO + */ +CFoo(char arg) { +} +~CFoo(); +int foo1(int arg); +int foo2(); +/** + * foo3 + * TODO: DESCRIPTION + * @param ch TODO + * @param xx TODO + * @return TODO + */ +int foo3(char ch, int xx) +{ +} +}; + +/** + * CFoo + * TODO: DESCRIPTION + * @param arg TODO + * @return TODO + */ +CFoo::CFoo(int arg) { +} + +/** + * ~CFoo + * TODO: DESCRIPTION + * @return TODO + */ +CFoo::~CFoo() { +} + +/** + * foo1 + * TODO: DESCRIPTION + * @param arg TODO + * @param arg2 TODO + * @return TODO + */ +int CFoo::foo1(int arg, int arg2) +{ +} + +/** + * foo2 + * TODO: DESCRIPTION + * @return TODO + */ +int CFoo::foo2() +{ +} + +/** + * operator + + * TODO: DESCRIPTION + * @return TODO + */ +int CFoo::operator +() +{ +} + +/** + * func + * TODO: DESCRIPTION + * @return TODO + */ +map<string, int> func() +{ + // some codes +} + +/** + * some_func + * TODO: DESCRIPTION + * @return TODO + */ +int some_func(void) +{ +} + +class some_class_declaration; + +int some_func_declaration(); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30872-Issue_2752.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30872-Issue_2752.cpp new file mode 100644 index 00000000..b305b50f --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30872-Issue_2752.cpp @@ -0,0 +1,3 @@ +int main() { +} +// @filename Issue_2752.cpp as input file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30880-bug_1758.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30880-bug_1758.cpp new file mode 100644 index 00000000..b0f35107 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30880-bug_1758.cpp @@ -0,0 +1,12 @@ +for(int f=0; f<(Element::nf)*2; f++) +{ + if (f%2==1) p = p-1; + { + this->pInterpolation[i]=p; + this->cInterpolation[i]=0.; + this->dofInterpolation[i]=e+f; + this->coefInterpolation[i]=1.; + i++; + p++; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30881-bug_1758-f.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30881-bug_1758-f.cpp new file mode 100644 index 00000000..24bb563b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30881-bug_1758-f.cpp @@ -0,0 +1,8 @@ +int main() +{ + + for(int f=0; f < 1; f++) + auto a = int{1}; + + return 0; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30900-region.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30900-region.cpp new file mode 100644 index 00000000..27823ca6 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30900-region.cpp @@ -0,0 +1,20 @@ +class X : Y { + int foo1; + #pragma region something + int foo2 = 2; + #pragma endregion + int foo() + { + + #pragma region something else + int foo3 = 3; + #pragma region nested + int foo4 = 0; + #pragma endregion + int foo5 = 0; + #pragma endregion + } + +} + + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30901-region.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30901-region.cpp new file mode 100644 index 00000000..b7bebae8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30901-region.cpp @@ -0,0 +1,20 @@ +class X : Y { + int foo1; + #pragma region something + int foo2 = 2; + #pragma endregion + int foo() + { + + #pragma region something else + int foo3 = 3; + #pragma region nested + int foo4 = 0; + #pragma endregion + int foo5 = 0; + #pragma endregion + } + +} + + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30902-region.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30902-region.cpp new file mode 100644 index 00000000..39b20ea6 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30902-region.cpp @@ -0,0 +1,20 @@ +class X : Y { + int foo1; +#pragma region something + int foo2 = 2; +#pragma endregion + int foo() + { + + #pragma region something else + int foo3 = 3; + #pragma region nested + int foo4 = 0; + #pragma endregion + int foo5 = 0; + #pragma endregion + } + +} + + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30903-region.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30903-region.cpp new file mode 100644 index 00000000..d6e3403a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30903-region.cpp @@ -0,0 +1,20 @@ +class X : Y { + int foo1; + #pragma region something + int foo2 = 2; + #pragma endregion + int foo() + { + + #pragma region something else + int foo3 = 3; + #pragma region nested + int foo4 = 0; + #pragma endregion + int foo5 = 0; + #pragma endregion + } + +} + + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30907-Issue_1813.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30907-Issue_1813.cpp new file mode 100644 index 00000000..d5a3cc71 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30907-Issue_1813.cpp @@ -0,0 +1,29 @@ +namespace ns1 +{ +namespace ns2 +{ + void func0() + { + functionThatTakesALambda( [&] () -> void + { + lambdaBody; + }); + functionThatTakesALambda( [&] __device__ () -> void + { + lambdaBody; + }); + functionThatTakesALambda( [&] __host__ __device__ () -> void + { + lambdaBody; + }); + functionThatTakesALambda( [&] DEVICE_LAMBDA_CONTEXT () -> void + { + lambdaBody; + }); + functionThatTakesALambda( [&] HOST_DEVICE_LAMBDA_CONTEXT () -> void + { + lambdaBody; + }); + } +} +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30908-Issue_1813-2.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30908-Issue_1813-2.cpp new file mode 100644 index 00000000..310de82f --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30908-Issue_1813-2.cpp @@ -0,0 +1,11 @@ +namespace n1 { +namespace n2 { + + void func() { + another_func([]() { + return 42; + }); + } + +} +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30909-Issue_1813-3.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30909-Issue_1813-3.cpp new file mode 100644 index 00000000..08c8405d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30909-Issue_1813-3.cpp @@ -0,0 +1,13 @@ +namespace n1 { +namespace n2 { +namespace n3 { + + void func() { + another_func([]() { + return 42; + }); + } + +} +} +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30910-indent_namespace.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30910-indent_namespace.h new file mode 100644 index 00000000..d569a3ca --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30910-indent_namespace.h @@ -0,0 +1,32 @@ +namespace ns1 { + + void bar1(void); + + class foo1 + { + int i1; + }; +} + +namespace ns2 +{ + + void bar2(void); + + class foo2 + { + int i2; + }; +} + +namespace +{ + + void bar3(void); + class foo3 + { + int i3; + }; + +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30911-indent_namespace.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30911-indent_namespace.h new file mode 100644 index 00000000..6f80dc3b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30911-indent_namespace.h @@ -0,0 +1,32 @@ +namespace ns1 { + +void bar1(void); + +class foo1 +{ + int i1; +}; +} + +namespace ns2 +{ + +void bar2(void); + +class foo2 +{ + int i2; +}; +} + +namespace +{ + +void bar3(void); +class foo3 +{ + int i3; +}; + +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30912-long_namespace.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30912-long_namespace.cpp new file mode 100644 index 00000000..80af6e83 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30912-long_namespace.cpp @@ -0,0 +1,15 @@ +namespace boo3 {
+ int Fun1()
+ {
+ return 42;
+ }
+}
+
+namespace boo4 {
+ int Fun2()
+ {
+ int a = 7;
+ int b = 8;
+ return a+b;
+ }
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30913-indent_namespace2.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30913-indent_namespace2.h new file mode 100644 index 00000000..196b2322 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30913-indent_namespace2.h @@ -0,0 +1,13 @@ +namespace ns1 { +namespace ns2 { +namespace ns3 { + + using namespace foo::os; + + class foo2 + { + int i2; + }; +} +} +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30914-indent_namespace_single_indent.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30914-indent_namespace_single_indent.h new file mode 100644 index 00000000..24a9b935 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30914-indent_namespace_single_indent.h @@ -0,0 +1,100 @@ +namespace ns1 { +namespace ns2 { +namespace ns3 { + void a(); +} +} +} + +extern "C" { + namespace ns1 { + namespace ns2 { + namespace ns3 { + void b(); + } + } + } +} + +namespace ns1 { + extern "C" { + namespace ns2 { + namespace ns3 { + void c(); + } + } + } +} + +namespace ns1 { +namespace ns2 { + extern "C" { + namespace ns3 { + void d(); + } + } +} +} + +namespace ns1 { +namespace ns2 { +namespace ns3 { + extern "C" { + void e(); + } +} +} +} + +#define M1(ns1, ns2, ns3, f) \ + namespace ns1 { \ + namespace ns2 { \ + namespace ns3 { \ + void f(); \ + } \ + } \ + } + +#define M2(ns1, ns2, ns3, f) \ + extern "C" { \ + namespace ns1 { \ + namespace ns2 { \ + namespace ns3 { \ + void b(); \ + } \ + } \ + } \ + } + +#define M3(ns1, ns2, ns3, f) \ + namespace ns1 { \ + extern "C" { \ + namespace ns2 { \ + namespace ns3 { \ + void c(); \ + } \ + } \ + } \ + } + +#define M4(ns1, ns2, ns3, f) \ + namespace ns1 { \ + namespace ns2 { \ + extern "C" { \ + namespace ns3 { \ + void d(); \ + } \ + } \ + } \ + } + +#define M5(ns1, ns2, ns3, f) \ + namespace ns1 { \ + namespace ns2 { \ + namespace ns3 { \ + extern "C" { \ + void e(); \ + } \ + } \ + } \ + } diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30915-bug_1235.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30915-bug_1235.cpp new file mode 100644 index 00000000..b9ff78a1 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30915-bug_1235.cpp @@ -0,0 +1 @@ +namespace dudeNamespace { class ForwardFooClass; } diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30916-Issue_1737.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30916-Issue_1737.cpp new file mode 100644 index 00000000..06b0866b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30916-Issue_1737.cpp @@ -0,0 +1,11 @@ +template<class T> +class foo +{ +public: +T x; +foo<T>(int a) : x(a) +{ + int y = a; + int z = 13; +} +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30917-Issue_2345-3.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30917-Issue_2345-3.cpp new file mode 100644 index 00000000..787ce29b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30917-Issue_2345-3.cpp @@ -0,0 +1,5 @@ +namespace fooD { + void a(); + void b(); + void c(); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30918-Issue_2345-4.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30918-Issue_2345-4.cpp new file mode 100644 index 00000000..f82d757d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30918-Issue_2345-4.cpp @@ -0,0 +1,6 @@ +namespace fooD { +void a(); +void b(); +void c(); +void d(); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30919-Issue_2387.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30919-Issue_2387.cpp new file mode 100644 index 00000000..526278d6 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30919-Issue_2387.cpp @@ -0,0 +1,14 @@ +namespace bar +{ +void none(); +}; + +void foo() +{ + namespace // does not + x // start a + = // namespace + bar; + + x::none(); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30920-indent-off.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30920-indent-off.cpp new file mode 100644 index 00000000..f9eccdb8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30920-indent-off.cpp @@ -0,0 +1,29 @@ +struct X +{ + void operator-(int); + void operator+(int); + void operator()(); +}; +/* *INDENT-OFF* */ + struct Y { + void operator-(int){} + + + void operator+(int){} \ + void operator()(){} + + void func() { + auto x = " test\t ... ???";} + }; +/* *INDENT-ON* */ +struct Y +{ + void operator-(int){} + void operator+(int){} + void operator()(){} + void func() + { + auto x = " test\t ... ???"; + } +}; + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30921-variadic-template.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30921-variadic-template.h new file mode 100644 index 00000000..f159e700 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30921-variadic-template.h @@ -0,0 +1,10 @@ +template<int __i, int... _Indexes, typename _IdxHolder, typename... + _Elements> +struct __index_holder_impl<__i, __index_holder<_Indexes...>, + _IdxHolder, _Elements...> +{ + typedef typename __index_holder_impl<__i + 1, + __index_holder<_Indexes..., + __i>, + _Elements...>::type type; +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30922-variadic-template.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30922-variadic-template.h new file mode 100644 index 00000000..0a1bd443 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30922-variadic-template.h @@ -0,0 +1,10 @@ +template<int __i, int... _Indexes, typename _IdxHolder, typename ... + _Elements> +struct __index_holder_impl<__i, __index_holder<_Indexes...>, + _IdxHolder, _Elements ...> +{ + typedef typename __index_holder_impl<__i + 1, + __index_holder<_Indexes..., + __i>, + _Elements ...>::type type; +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30923-sf.2886991.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30923-sf.2886991.cpp new file mode 100644 index 00000000..61dc7c21 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30923-sf.2886991.cpp @@ -0,0 +1,12 @@ + +void log_fmt(log_sev_t sev, const char *fmt, ...) __attribute__((format(printf, 2, 3))); + +#define LOG_FMT(sev, args ...) \ + do { if (log_sev_on(sev)) { log_fmt(sev, ## args); } } while (0) + +void foo() +{ + try {} + catch (...) // <== HERE + {} +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30924-sf.2886991.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30924-sf.2886991.cpp new file mode 100644 index 00000000..ce5e0b93 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30924-sf.2886991.cpp @@ -0,0 +1,12 @@ + +void log_fmt( log_sev_t sev, const char *fmt, ... ) __attribute__( ( format( printf, 2, 3 ) ) ); + +#define LOG_FMT( sev, args... ) \ + do { if ( log_sev_on( sev ) ) { log_fmt( sev, ## args ); } } while ( 0 ) + +void foo() +{ + try {} + catch ( ... ) // <== HERE + {} +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30925-function-def.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30925-function-def.cpp new file mode 100644 index 00000000..2d6df544 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30925-function-def.cpp @@ -0,0 +1,82 @@ +int&Function() +{ + static int x; + + return(x); +} + +void foo1(int param1, int param2, char *param2); + +void foo2(int param1, + int param2, + char *param2); + +void foo3(int param1, + int param2, // comment + char *param2 + ); + +struct whoopee *foo4(int param1, int param2, char *param2 /* comment */); + +const struct snickers * +foo5(int param1, int param2, char *param2); + + +void foo(int param1, int param2, char *param2) +{ + printf ("boo!\n"); +} + +int classname::method(); + +int classname::method() +{ + foo(); +} + +int +classname::method2(); + +int +classname::method2() +{ + foo2(); +} + +const int& className::method1(void) const +{ + // stuff +} + +const longtypename& className::method2(void) const +{ + // stuff +} + +int&foo(); + +int&foo() +{ + list_for_each (a, b) + { + bar (a); + } + return(nuts); +} + +void Foo::bar() +{ +} + +Foo::Foo() +{ +} + +Foo::~Foo() +{ +} + +void func(void) +{ + Directory dir ("arg"); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30926-function-def.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30926-function-def.cpp new file mode 100644 index 00000000..78b23a14 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30926-function-def.cpp @@ -0,0 +1,82 @@ +int&Function() +{ + static int x; + + return(x); +} + +void foo1(int param1, int param2, char *param2); + +void foo2(int param1, + int param2, + char *param2); + +void foo3(int param1, + int param2, // comment + char *param2 + ); + +struct whoopee *foo4(int param1, int param2, char *param2 /* comment */); + +const struct snickers * +foo5(int param1, int param2, char *param2); + + +void foo(int param1, int param2, char *param2) +{ + printf ("boo!\n"); +} + +int classname::method(); + +int classname::method() +{ + foo(); +} + +int +classname::method2(); + +int +classname::method2() +{ + foo2(); +} + +const int& className::method1(void) const +{ + // stuff +} + +const longtypename& className::method2(void) const +{ + // stuff +} + +int&foo(); + +int&foo() +{ + list_for_each (a, b) + { + bar (a); + } + return(nuts); +} + +void Foo::bar() +{ +} + +Foo::Foo () +{ +} + +Foo::~Foo () +{ +} + +void func(void) +{ + Directory dir ("arg"); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30927-function-def.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30927-function-def.cpp new file mode 100644 index 00000000..bceb00f6 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30927-function-def.cpp @@ -0,0 +1,82 @@ +int&Function () +{ + static int x; + + return(x); +} + +void foo1(int param1, int param2, char *param2); + +void foo2(int param1, + int param2, + char *param2); + +void foo3(int param1, + int param2, // comment + char *param2 + ); + +struct whoopee *foo4(int param1, int param2, char *param2 /* comment */); + +const struct snickers * +foo5(int param1, int param2, char *param2); + + +void foo(int param1, int param2, char *param2) +{ + printf ("boo!\n"); +} + +int classname::method(); + +int classname::method () +{ + foo(); +} + +int +classname::method2(); + +int +classname::method2 () +{ + foo2(); +} + +const int& className::method1(void) const +{ + // stuff +} + +const longtypename& className::method2(void) const +{ + // stuff +} + +int&foo(); + +int&foo () +{ + list_for_each (a, b) + { + bar (a); + } + return(nuts); +} + +void Foo::bar () +{ +} + +Foo::Foo() +{ +} + +Foo::~Foo() +{ +} + +void func(void) +{ + Directory dir ("arg"); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30928-function-def.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30928-function-def.cpp new file mode 100644 index 00000000..b14ecb11 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30928-function-def.cpp @@ -0,0 +1,82 @@ +int&Function() +{ + static int x; + + return(x); +} + +void foo1(int param1, int param2, char *param2); + +void foo2(int param1, + int param2, + char *param2); + +void foo3(int param1, + int param2, // comment + char *param2 + ); + +struct whoopee *foo4(int param1, int param2, char *param2 /* comment */); + +const struct snickers * +foo5(int param1, int param2, char *param2); + + +void foo(int param1, int param2, char *param2) +{ + printf ("boo!\n"); +} + +int classname::method (); + +int classname::method() +{ + foo(); +} + +int +classname::method2 (); + +int +classname::method2() +{ + foo2(); +} + +const int& className::method1(void) const +{ + // stuff +} + +const longtypename& className::method2(void) const +{ + // stuff +} + +int&foo (); + +int&foo() +{ + list_for_each (a, b) + { + bar (a); + } + return(nuts); +} + +void Foo::bar() +{ +} + +Foo::Foo() +{ +} + +Foo::~Foo() +{ +} + +void func(void) +{ + Directory dir ("arg"); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30929-bug_1324.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30929-bug_1324.cpp new file mode 100644 index 00000000..1aca5762 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30929-bug_1324.cpp @@ -0,0 +1,10 @@ +{ + for (i = 0;i < 10;i++) + { + b = i + 1; + } + for (;; ) + { + b = b + 1; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30930-indent_var_def.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30930-indent_var_def.cpp new file mode 100644 index 00000000..5b3ee4e2 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30930-indent_var_def.cpp @@ -0,0 +1,10 @@ +void function() +{ +int n; +float f; + + anotherFunction(); + char foo; + + somethingelse(); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30931-indent_var_def_cont.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30931-indent_var_def_cont.cpp new file mode 100644 index 00000000..c505389f --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30931-indent_var_def_cont.cpp @@ -0,0 +1,16 @@ +int + a, b, c; + +int d, + e, f; + +void bar(void) +{ + struct foobar + a = { 'x', 0 }; + struct foobar + b = { 'y', 2 }, + c = { 'z', 4 }; + struct foobar d = { 'y', 2 }, + e = { 'z', 4 }; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30932-indent_var_def_cont.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30932-indent_var_def_cont.cpp new file mode 100644 index 00000000..70b7304e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30932-indent_var_def_cont.cpp @@ -0,0 +1,16 @@ +int + a, b, c; + +int d, + e, f; + +void bar(void) +{ + struct foobar + a = { 'x', 0 }; + struct foobar + b = { 'y', 2 }, + c = { 'z', 4 }; + struct foobar d = { 'y', 2 }, + e = { 'z', 4 }; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30933-indent_paren_after_func_def.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30933-indent_paren_after_func_def.cpp new file mode 100644 index 00000000..8a775135 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30933-indent_paren_after_func_def.cpp @@ -0,0 +1,12 @@ +class SomeClass
+{
+public:
+void SomeFunction
+ (
+ int const aTest,
+ int const aResult
+ )
+{
+ DoSomeStuff();
+}
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30934-indent_paren_after_func_decl.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30934-indent_paren_after_func_decl.cpp new file mode 100644 index 00000000..6af21978 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30934-indent_paren_after_func_decl.cpp @@ -0,0 +1,8 @@ +class SomeClass {
+public:
+void SomeFunction
+ (
+ int const aTest,
+ int const aResult
+ );
+}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30935-indent-misc.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30935-indent-misc.cpp new file mode 100644 index 00000000..ad8de7b0 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30935-indent-misc.cpp @@ -0,0 +1,60 @@ +struct S +{ + int one, two; + S(int i=1) + { + one = i; + two = i + i; + } + bool check() const + { + return(one == 1); + } +}; + +struct S +{ + enum + { + twentythree = 23, + fortytwoseven = 427 + }; + int one, two; + S(int i=1) + { + one = i; + two = i + i; + } + bool check() const + { + return(one == 1); + } +}; + +static uint jhash(K x) +{ + ubyte *k; + uint a, + b, + c; + + uint + a, + b, + c; + + len = x.length; +} + +const char *token_names[] = +{ + [CT_POUND] = "POUND", + [CT_PREPROC] = "PREPROC", +}; + +struct whoopee * +foo4( + int param1, + int param2, + char *param2 + ); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30936-indent_braces_no.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30936-indent_braces_no.h new file mode 100644 index 00000000..725b0402 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30936-indent_braces_no.h @@ -0,0 +1,22 @@ +class MyClass +{ +public: + + struct something + { + int one; + int two; + } + + MyClass() + { + } + + void oneFunction() + { + if (1 == 0) + { + instructions; + } + } +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30937-indent_param.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30937-indent_param.cpp new file mode 100644 index 00000000..31569ec1 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30937-indent_param.cpp @@ -0,0 +1,4 @@ +extern int select(int __nfds, fd_set * __restrict __readfds, + fd_set * __restrict __writefds, + fd_set * __restrict __exceptfds, + struct timeval * __restrict __timeout); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30938-indent_switch_pp.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30938-indent_switch_pp.cpp new file mode 100644 index 00000000..dd910c56 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30938-indent_switch_pp.cpp @@ -0,0 +1,20 @@ +// Example for not indenting preprocesser statements inside switch statements
+switch(...)
+{
+case 1:
+case 2:
+{
+ int v;
+ ...
+}
+break;
+
+#if (USE_FIVE)
+case 3:
+ doFive();
+ break;
+#endif
+
+default:
+ break;
+}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30939-indent_paren_after_func_call.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30939-indent_paren_after_func_call.cpp new file mode 100644 index 00000000..a1453862 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30939-indent_paren_after_func_call.cpp @@ -0,0 +1,8 @@ +SomeClass::SomeClass()
+{
+ SomeFunction
+ (
+ aTest,
+ aResult
+ );
+}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30940-case-brace-remove.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30940-case-brace-remove.cpp new file mode 100644 index 00000000..cd163570 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30940-case-brace-remove.cpp @@ -0,0 +1,21 @@ +int SomeClass::method() +{ + switch (1) + { + case 0: + { + double v; + break; + } + + case 1: + { + double v; + v = this->mat.operator()(0, 0); + break; + } + + case 2: + foo(); + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30941-Issue_2150.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30941-Issue_2150.cpp new file mode 100644 index 00000000..1e4d6bf5 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30941-Issue_2150.cpp @@ -0,0 +1,17 @@ +int f( int a ) +{ + switch ( a ) + { + case 1: + { + return a; + } + case 2: +#if 1 + case 3: +#endif + { + return a; + } + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30942-Issue_1692.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30942-Issue_1692.cpp new file mode 100644 index 00000000..89de1d6a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30942-Issue_1692.cpp @@ -0,0 +1,6 @@ +switch (a) +{ + case 0: + // code + break; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30943-Issue_2735.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30943-Issue_2735.cpp new file mode 100644 index 00000000..3e292425 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30943-Issue_2735.cpp @@ -0,0 +1,24 @@ +void func(int a){ + switch (a) + { + case 1: + ; + break; + + case 2: + ; + break; + + case 3: + { + int b = 3; + } + break; + + case 4: + { + float f = 4.0; + } + break; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30945-sf.3266678.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30945-sf.3266678.cpp new file mode 100644 index 00000000..810b5105 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30945-sf.3266678.cpp @@ -0,0 +1,5 @@ +void CMyClass::myFunction() +{ + CMyReferencePointer& tmpPointer = (CMyReferencePointer& )getMyValue(); +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30946-sf.3315874.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30946-sf.3315874.h new file mode 100644 index 00000000..05161496 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30946-sf.3315874.h @@ -0,0 +1,44 @@ +#undef dot +#undef cross + +extern "C" { +#include "data_types.h" +} +vec_ operator+( const vec_ &, const vec_ & ); /* v = v1 + v2 */ +vec_ operator-( const vec_ &, const vec_ & ); /* v = v1 - v2 */ +mat_ operator+( const mat_ &, const mat_ & ); /* m = m1 + m2 */ +mat_ operator-( const mat_ &, const mat_ & ); /* m = m1 - m2 */ +vec_ &operator+=( vec_ &, const vec_ & ); /* v += v2 */ +mat_ &operator+=( mat_ &, const mat_ & ); /* m += m2 */ +vec_ &operator-=( vec_ &, const vec_ & ); /* v -= v2 */ +mat_ &operator-=( mat_ &, const mat_ & ); /* m -= m2 */ +vec_ operator*( double, const vec_ & ); /* v = a * v1 */ +mat_ operator*( double, const mat_ & ); /* m = a * m1 */ +vec_ operator*( const vec_ &, double ); /* v = v1 * a */ +mat_ operator*( const mat_ &, double ); /* m = m1 * a */ +vec_ operator/( const vec_ &, double ); /* v = v1 / a */ +mat_ operator/( const mat_ &, double ); /* m = m1 / a */ +vec_ operator*=( vec_ &, const double a ); /* v *= a */ +vec_ operator/=( vec_ &, const double a ); /* v /= a */ +vec_ operator*( const mat_ &, const vec_ & ); /* v = m1 * v1 */ +mat_ operator*( const mat_ &, const mat_ & ); /* m = m1 * m2 */ +quat_ operator*( const quat_ &, const quat_ & ); /* q = q1 * q2 */ +quat_ operator*( double, const quat_ & ); /* q = a * q1 */ +quat_ operator*( const quat_ &, double ); /* q = q1 * a */ +quat_ operator/( const quat_ &, double ); /* q = q1 / a */ +vec_ operator-( const vec_ & ); /* v = - v1 */ +vec_ operator+( const vec_ & ); /* v = + v1 */ +mat_ operator-( const mat_ & ); /* m = - m1 */ +mat_ operator+( const mat_ & ); /* m = + m1 */ +quat_ operator+( const quat_ & ); /* q = + q */ +quat_ operator-( const quat_ & ); /* q = - q */ +quat_ &operator*=( quat_ &, const quat_ & ); /* q1 *= q2; */ +quat_ &operator+=( quat_ &, const quat_ & ); /* q1 += q2; */ +quat_ &operator*=( quat_ &, const double a ); /* q1 *= a; */ +quat_ operator+( const quat_ &q1, const quat_ &q2 ); /* q3 = q1 + q2 */ +vec_ unit ( const vec_ & ); /* unitize vec */ +quat_ unit ( const quat_ & ); /* unitize quat */ +mat_ trans ( const mat_ & ); /* transpose matrix */ +quat_ trans ( const quat_ & ); /* transpose quat */ +double dot ( const vec_, const vec_ ); /* vector dot product */ +vec_ cross ( const vec_, const vec_ ); /* vector cross product */ diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30947-bug_1689.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30947-bug_1689.cpp new file mode 100644 index 00000000..40d34d61 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30947-bug_1689.cpp @@ -0,0 +1,3 @@ +using value_type = int; +using reference = value_type&; +using const_reference = const value_type&; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30948-sp_before_byref_func.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30948-sp_before_byref_func.cpp new file mode 100644 index 00000000..4abfe954 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30948-sp_before_byref_func.cpp @@ -0,0 +1,8 @@ +const Foo& Foo::operator ==(Foo& me){ + ::sockaddr* ptr = (::sockaddr*)&host; + return me; +} + +MyType& MyClass::myMethode() { + const MyType& t = getSomewhere(); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30949-Issue_2757.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30949-Issue_2757.cpp new file mode 100644 index 00000000..ba83c29e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30949-Issue_2757.cpp @@ -0,0 +1,5 @@ +void +foo(map< int, int >& aaa, + int bbb) +{ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30950-sp_before_tr_emb_cmt_input.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30950-sp_before_tr_emb_cmt_input.cpp new file mode 100644 index 00000000..943d303b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30950-sp_before_tr_emb_cmt_input.cpp @@ -0,0 +1,12 @@ +/* leading cmt */ int w; +int y; /* embedded cmt */ int z; +// whole cpp cmt +int x; // trailing cpp cmt +/* whole c cmt */ +int x; /* trailing c cmt */ +struct foo { // trailing cmt + int x; // trailing cmt + // whole cmt + int a; /* emb cmt */ int b; // trailing cmt +}; // trailing cmt +int a; /* emb cmt */ int b; // trailing cmt diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30951-sp_before_tr_emb_cmt_input.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30951-sp_before_tr_emb_cmt_input.cpp new file mode 100644 index 00000000..c7e25f1c --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30951-sp_before_tr_emb_cmt_input.cpp @@ -0,0 +1,12 @@ +/* leading cmt */ int w; +int y; /* embedded cmt */ int z; +// whole cpp cmt +int x; // trailing cpp cmt +/* whole c cmt */ +int x; /* trailing c cmt */ +struct foo { // trailing cmt + int x; // trailing cmt + // whole cmt + int a; /* emb cmt */ int b; // trailing cmt +}; // trailing cmt +int a; /* emb cmt */ int b; // trailing cmt diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30952-sp_before_constr_colon.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30952-sp_before_constr_colon.cpp new file mode 100644 index 00000000..ad0e38d5 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30952-sp_before_constr_colon.cpp @@ -0,0 +1,4 @@ +struct MyClass : public Foo { + MyClass(int a, int b, int c): + m_a(a), m_b(b), m_c(c) {} +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30953-constr_colon.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30953-constr_colon.cpp new file mode 100644 index 00000000..6c0706e5 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30953-constr_colon.cpp @@ -0,0 +1,9 @@ +class foo +{ + void bar_c(int t, int u) + : t(222) + , u(88) + { + // code + } +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30954-Issue_2305.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30954-Issue_2305.cpp new file mode 100644 index 00000000..7458b913 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30954-Issue_2305.cpp @@ -0,0 +1,9 @@ +template<class T> +class Foo<T>::Bar +{ + void + Bar(int iii) + : iii(0) + { + } +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30955-indent_ctor_init.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30955-indent_ctor_init.cpp new file mode 100644 index 00000000..55982328 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30955-indent_ctor_init.cpp @@ -0,0 +1,17 @@ +struct MyClass : public Foo, + private Bar { + MyClass( + int a, + int b, + int c) + : m_a(a), + m_b(b), + m_c(c) {} + + private: + int m_a, m_b, m_c; +}; + +struct TheirClass + : public Foo, + private Bar {}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30956-indent_ctor_init.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30956-indent_ctor_init.cpp new file mode 100644 index 00000000..29a146a9 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30956-indent_ctor_init.cpp @@ -0,0 +1,18 @@ +struct MyClass +: public Foo, + private Bar { + MyClass( + int a, + int b, + int c) + : m_a(a), + m_b(b), + m_c(c) {} + + private: + int m_a, m_b, m_c; +}; + +struct TheirClass +: public Foo, + private Bar {}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30957-class-init.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30957-class-init.cpp new file mode 100644 index 00000000..faa28873 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30957-class-init.cpp @@ -0,0 +1,65 @@ + +class Foo : public Bar +{ + +}; + +#define CTOR(i, _) : T(X()), \ + y() \ +{ } + +class Foo2 : public Bar +{ + +}; + +class GLOX_API ClientBase : public Class, + public OtherClass, + public ThridClass, + public ForthClass +{ + public: + ClientBase(const ClientBase & f){ + // do something + } +}; + +ClientBase :: ClientBase (const std::string& ns, + const std::string& ns1, + const std::string& ns2) +{ + +} + +Foo::Foo(int bar) + : someVar(bar), othervar(0) +{ +} + +Foo::Foo(int bar) + : someVar(bar), + othervar(0) +{ +} + +Foo::Foo(int bar) + : someVar(bar), othervar(0) +{ +} + +Foo::Foo(int bar) + : someVar(bar), othervar(0) +{ +} + +Foo::Foo(int bar) + : someVar(bar), + othervar(0) +{ +} + +Foo::Foo(int bar) + : someVar(bar), + othervar(0) +{ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30958-nl_for_leave_one_liners.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30958-nl_for_leave_one_liners.cpp new file mode 100644 index 00000000..8ff2405f --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30958-nl_for_leave_one_liners.cpp @@ -0,0 +1,2 @@ +for (int i = 0; i < 10; ++i)
+ i++;
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30959-nl_for_leave_one_liners.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30959-nl_for_leave_one_liners.cpp new file mode 100644 index 00000000..382d2815 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30959-nl_for_leave_one_liners.cpp @@ -0,0 +1 @@ +for (int i = 0; i < 10; ++i) i++;
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30960-Issue_2151.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30960-Issue_2151.cpp new file mode 100644 index 00000000..d0ee05d2 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30960-Issue_2151.cpp @@ -0,0 +1,5 @@ +void f( int a ) +{ + namespace C { enum { Value }; } + const bool ok = ( a & C::Value ) && true; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30961-Issue_2232.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30961-Issue_2232.cpp new file mode 100644 index 00000000..7867820b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30961-Issue_2232.cpp @@ -0,0 +1,7 @@ +void main() +{ + if (true) return; + + mInitialized = true; + return 0; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30962-nl_assign_leave_one_liners.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30962-nl_assign_leave_one_liners.cpp new file mode 100644 index 00000000..cf3325f0 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30962-nl_assign_leave_one_liners.cpp @@ -0,0 +1 @@ +int q[] = { 3, 4 }; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30963-Issue_2907.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30963-Issue_2907.cpp new file mode 100644 index 00000000..c0192c4d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30963-Issue_2907.cpp @@ -0,0 +1,7 @@ +template< typename Enum > class Flags +{ +public: +constexpr Flags() : value{ 0 } {} +constexpr Flags( Enum f ) : value( static_cast< value_t >( f ) ) {} +constexpr Flags( Flags const& ) = default; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30964-Issue_2823.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30964-Issue_2823.cpp new file mode 100644 index 00000000..c633398f --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30964-Issue_2823.cpp @@ -0,0 +1,3 @@ +namespace farm::animal::chicken::leg +{ +} // namespace farm::animal::chicken::leg diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30970-Issue_2219.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30970-Issue_2219.cpp new file mode 100644 index 00000000..e08cb889 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30970-Issue_2219.cpp @@ -0,0 +1,5 @@ +void foo() +{ + for(int i = 0; i < 1; i++) return (false); + float g = 0.13; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30971-Issue_2224.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30971-Issue_2224.cpp new file mode 100644 index 00000000..0c454905 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30971-Issue_2224.cpp @@ -0,0 +1,4 @@ +static void GPUFailedMsgA(const long long int error, const char* file, int line) +{ + if (GPUFailedMsgAI(error, file, line)) throw std::runtime_error("Failure"); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30972-Issue_2229.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30972-Issue_2229.cpp new file mode 100644 index 00000000..0c44ed6a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30972-Issue_2229.cpp @@ -0,0 +1,6 @@ +int foo() +{ + if (false) return 1; + if (true) return 2; + float a = 0; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30973-Issue_2236.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30973-Issue_2236.cpp new file mode 100644 index 00000000..7f7f01f5 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30973-Issue_2236.cpp @@ -0,0 +1,8 @@ +class A +{ +public: + virtual void f11111111( int a, int b, int c ) = 0; + virtual void f2( int* ptr2 = nullptr ) = 0; + virtual void f2333( int* ptr3 = 3 ) = delete; + void f244444( int* ptr4 = 4 ) = default; +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30974-using-alias-in-define.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30974-using-alias-in-define.cpp new file mode 100644 index 00000000..1b4153d8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/30974-using-alias-in-define.cpp @@ -0,0 +1,6 @@ +#define UNC_DECLARE_FLAGS(flag_type, enum_type) \ + using flag_type = flags<enum_type> + +#define UNC_DECLARE_OPERATORS_FOR_FLAGS(flag_type) \ + inline flag_type operator&(flag_type::enum_t f1, flag_type::enum_t f2) \ + { return(flag_type { f1 } & f2); } diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31000-digraph.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31000-digraph.cpp new file mode 100644 index 00000000..e985dae6 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31000-digraph.cpp @@ -0,0 +1,5 @@ +x = reinterpret_cast< ::Symbol*>();
+
+int b() {
+ char f <: 32 :> = <% 0 %>;
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31001-digraph.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31001-digraph.cpp new file mode 100644 index 00000000..641390a6 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31001-digraph.cpp @@ -0,0 +1,6 @@ +x = reinterpret_cast< ::Symbol *>();
+
+int b()
+{
+ char f<: 32 :> = < % 0 % >;
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31050-pos_assign.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31050-pos_assign.cpp new file mode 100644 index 00000000..af55296b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31050-pos_assign.cpp @@ -0,0 +1,7 @@ +static const unsigned char radiooff_light_bits[] = +{ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x08, 0x00, 0x08, 0x0c, 0x06, + 0xf0, 0x01 +}; + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31051-pos_assign.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31051-pos_assign.cpp new file mode 100644 index 00000000..af55296b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31051-pos_assign.cpp @@ -0,0 +1,7 @@ +static const unsigned char radiooff_light_bits[] = +{ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x10, 0x00, 0x10, + 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x08, 0x00, 0x08, 0x0c, 0x06, + 0xf0, 0x01 +}; + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31101-nl_before_brace_open_test.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31101-nl_before_brace_open_test.cpp new file mode 100644 index 00000000..fdf9067a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31101-nl_before_brace_open_test.cpp @@ -0,0 +1,33 @@ +int foo1() { + int i; if (true) { i=2; } +} + +namespace { int foo1() { + int i; if (true) { i=2; } + } +} + +class bar { +int foo1() { + int i; i = 1; if (true) { i=2; } +} +int foo2() { + int i; i = 1; if (true) { i=2; } +} +} + +#ifdef __cplusplus +extern "C" { +#endif + +static const kjs_double_t NaN_Bytes = {{0x7f, 0xf8, 0, 0, 0, 0, 0, 0} +}; + +#ifdef __cplusplus +} +#endif + +static struct LanguageForEncoding { + const char *index; int data; +} const language_for_encoding[] = { {"iso 8859-1", 13}, {"iso 8859-15", 13} } + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31102-nl_before_brace_open_test.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31102-nl_before_brace_open_test.cpp new file mode 100644 index 00000000..59342e57 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31102-nl_before_brace_open_test.cpp @@ -0,0 +1,50 @@ +int foo1() +{ + int i; if (true) + { i=2; } +} + +namespace +{ int foo1() + { + int i; if (true) + { i=2; } + } +} + +class bar +{ +int foo1() +{ + int i; i = 1; if (true) + { i=2; } +} +int foo2() +{ + int i; i = 1; if (true) + { i=2; } +} +} + +#ifdef __cplusplus +extern "C" +{ +#endif + +static const kjs_double_t NaN_Bytes = +{ + {0x7f, 0xf8, 0, 0, 0, 0, 0, 0} +}; + +#ifdef __cplusplus +} +#endif + +static struct LanguageForEncoding +{ + const char *index; int data; +} const language_for_encoding[] = +{ + {"iso 8859-1", 13}, + {"iso 8859-15", 13} } + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31103-nl_before_brace_open_test.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31103-nl_before_brace_open_test.cpp new file mode 100644 index 00000000..5efbf20e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31103-nl_before_brace_open_test.cpp @@ -0,0 +1,32 @@ +int foo1() { int i; if (true) { i=2; }} + +namespace { int foo1() { int i; if (true) { i=2; }}} + +class bar +{ +int foo1() { int i; i = 1; if (true) { i=2; }} +int foo2() { int i; i = 1; if (true) { i=2; }} +} + +#ifdef __cplusplus +extern "C" +{ +#endif + +static const kjs_double_t NaN_Bytes = +{ + {0x7f, 0xf8, 0, 0, 0, 0, 0, 0} +}; + +#ifdef __cplusplus +} +#endif + +static struct LanguageForEncoding +{ + const char *index; int data; +} const language_for_encoding[] = +{ + {"iso 8859-1", 13}, + {"iso 8859-15", 13} } + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31104-nl_before_brace_open_test.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31104-nl_before_brace_open_test.cpp new file mode 100644 index 00000000..a1b93406 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31104-nl_before_brace_open_test.cpp @@ -0,0 +1,33 @@ +int foo1() { int i; if (true) { i=2; }} + +namespace +{ int foo1() { int i; if (true) { i=2; }}} + +class bar +{ +int foo1() { int i; i = 1; if (true) { i=2; }} +int foo2() { int i; i = 1; if (true) { i=2; }} +} + +#ifdef __cplusplus +extern "C" +{ +#endif + +static const kjs_double_t NaN_Bytes = +{ + {0x7f, 0xf8, 0, 0, 0, 0, 0, 0} +}; + +#ifdef __cplusplus +} +#endif + +static struct LanguageForEncoding +{ + const char *index; int data; +} const language_for_encoding[] = +{ + {"iso 8859-1", 13}, + {"iso 8859-15", 13} } + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31400-trailing_return.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31400-trailing_return.cpp new file mode 100644 index 00000000..ef642eec --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31400-trailing_return.cpp @@ -0,0 +1,99 @@ +auto f0(int a, int b) -> int; + +struct Foo +{ + auto f01() -> bool; + auto f02() noexcept -> bool; + auto f03() noexcept(true) -> bool; + auto f04() noexcept(false) -> bool; + auto f05() noexcept -> bool = delete; + auto f06() noexcept(true) -> bool = delete; + auto f07() noexcept(false) -> bool = delete; + + auto f11() const -> bool; + auto f12() const noexcept -> bool; + auto f13() const noexcept(true) -> bool; + auto f14() const noexcept(false) -> bool; + auto f15() const noexcept -> bool = delete; + auto f16() const noexcept(true) -> bool = delete; + auto f17() const noexcept(false) -> bool = delete; + + auto f21() throw() -> bool; + auto f22() throw() -> bool = delete; + auto f23() const throw() -> bool; + auto f24() const throw() -> bool = delete; + + auto f25() const -> bool*; + auto f26() const -> bool* = delete; + auto f27() const -> bool&; + auto f28() const -> bool& = delete; + + auto f29() -> bool*; + auto f30() -> bool* = delete; + auto f31() noexcept -> bool*; + auto f32() noexcept(true) -> bool*; + auto f33() noexcept(false) -> bool*; + auto f34() noexcept -> bool* = delete; + auto f35() noexcept(true) -> bool* = delete; + auto f36() noexcept(false) -> bool* = delete; + auto f37() throw() -> bool*; + auto f38() throw() -> bool* = delete; + + auto f39() -> bool&; + auto f40() -> bool& = delete; + auto f41() noexcept -> bool&; + auto f42() noexcept(true) -> bool&; + auto f43() noexcept(false) -> bool&; + auto f44() noexcept -> bool& = delete; + auto f45() noexcept(true) -> bool& = delete; + auto f46() noexcept(false) -> bool& = delete; + auto f47() throw() -> bool&; + auto f48() throw() -> bool& = delete; + + auto f49() const -> bool*; + auto f50() const -> bool* = delete; + auto f51() const noexcept -> bool*; + auto f52() const noexcept(true) -> bool*; + auto f53() const noexcept(false) -> bool*; + auto f54() const noexcept -> bool* = delete; + auto f55() const noexcept(true) -> bool* = delete; + auto f56() const noexcept(false) -> bool* = delete; + auto f57() const throw() -> bool*; + auto f58() const throw() -> bool* = delete; + + auto f59() const -> bool&; + auto f60() const -> bool& = delete; + auto f61() const noexcept -> bool&; + auto f62() const noexcept(true) -> bool&; + auto f63() const noexcept(false) -> bool&; + auto f64() const noexcept -> bool& = delete; + auto f65() const noexcept(true) -> bool& = delete; + auto f66() const noexcept(false) -> bool& = delete; + auto f67() const throw() -> bool&; + auto f68() const throw() -> bool& = delete; +}; + +struct Bar +{ + Bar() : m_func([](void*) -> result_t { + return magic; + }) {} +}; + +void foo() +{ + auto l = [](int n) -> x_t { + return n + 5; + }; + x([](int n) -> x_t { + return n + 5; + }); +} + +static auto f25() -> bool { + return true; +} + +static auto f26() const noexcept(true) -> bool { + return true; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31401-trailing_return.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31401-trailing_return.cpp new file mode 100644 index 00000000..bfc09585 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31401-trailing_return.cpp @@ -0,0 +1,99 @@ +auto f0(int a, int b)->int; + +struct Foo +{ + auto f01()->bool; + auto f02() noexcept->bool; + auto f03() noexcept(true)->bool; + auto f04() noexcept(false)->bool; + auto f05() noexcept->bool = delete; + auto f06() noexcept(true)->bool = delete; + auto f07() noexcept(false)->bool = delete; + + auto f11() const->bool; + auto f12() const noexcept->bool; + auto f13() const noexcept(true)->bool; + auto f14() const noexcept(false)->bool; + auto f15() const noexcept->bool = delete; + auto f16() const noexcept(true)->bool = delete; + auto f17() const noexcept(false)->bool = delete; + + auto f21() throw()->bool; + auto f22() throw()->bool = delete; + auto f23() const throw()->bool; + auto f24() const throw()->bool = delete; + + auto f25() const->bool*; + auto f26() const->bool* = delete; + auto f27() const->bool&; + auto f28() const->bool& = delete; + + auto f29()->bool*; + auto f30()->bool* = delete; + auto f31() noexcept->bool*; + auto f32() noexcept(true)->bool*; + auto f33() noexcept(false)->bool*; + auto f34() noexcept->bool* = delete; + auto f35() noexcept(true)->bool* = delete; + auto f36() noexcept(false)->bool* = delete; + auto f37() throw()->bool*; + auto f38() throw()->bool* = delete; + + auto f39()->bool&; + auto f40()->bool& = delete; + auto f41() noexcept->bool&; + auto f42() noexcept(true)->bool&; + auto f43() noexcept(false)->bool&; + auto f44() noexcept->bool& = delete; + auto f45() noexcept(true)->bool& = delete; + auto f46() noexcept(false)->bool& = delete; + auto f47() throw()->bool&; + auto f48() throw()->bool& = delete; + + auto f49() const->bool*; + auto f50() const->bool* = delete; + auto f51() const noexcept->bool*; + auto f52() const noexcept(true)->bool*; + auto f53() const noexcept(false)->bool*; + auto f54() const noexcept->bool* = delete; + auto f55() const noexcept(true)->bool* = delete; + auto f56() const noexcept(false)->bool* = delete; + auto f57() const throw()->bool*; + auto f58() const throw()->bool* = delete; + + auto f59() const->bool&; + auto f60() const->bool& = delete; + auto f61() const noexcept->bool&; + auto f62() const noexcept(true)->bool&; + auto f63() const noexcept(false)->bool&; + auto f64() const noexcept->bool& = delete; + auto f65() const noexcept(true)->bool& = delete; + auto f66() const noexcept(false)->bool& = delete; + auto f67() const throw()->bool&; + auto f68() const throw()->bool& = delete; +}; + +struct Bar +{ + Bar() : m_func([](void*)->result_t { + return magic; + }) {} +}; + +void foo() +{ + auto l = [](int n)->x_t { + return n + 5; + }; + x([](int n)->x_t { + return n + 5; + }); +} + +static auto f25()->bool { + return true; +} + +static auto f26() const noexcept(true)->bool { + return true; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31402-trailing_return.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31402-trailing_return.cpp new file mode 100644 index 00000000..01adfc69 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31402-trailing_return.cpp @@ -0,0 +1,99 @@ +auto f0(int a, int b) -> int; + +struct Foo +{ + auto f01() -> bool; + auto f02() noexcept -> bool; + auto f03() noexcept(true) -> bool; + auto f04() noexcept(false) -> bool; + auto f05() noexcept -> bool=delete; + auto f06() noexcept(true) -> bool=delete; + auto f07() noexcept(false) -> bool=delete; + + auto f11() const -> bool; + auto f12() const noexcept -> bool; + auto f13() const noexcept(true) -> bool; + auto f14() const noexcept(false) -> bool; + auto f15() const noexcept -> bool=delete; + auto f16() const noexcept(true) -> bool=delete; + auto f17() const noexcept(false) -> bool=delete; + + auto f21() throw() -> bool; + auto f22() throw() -> bool=delete; + auto f23() const throw() -> bool; + auto f24() const throw() -> bool=delete; + + auto f25() const -> bool*; + auto f26() const -> bool* =delete; + auto f27() const -> bool&; + auto f28() const -> bool& =delete; + + auto f29() -> bool*; + auto f30() -> bool* =delete; + auto f31() noexcept -> bool*; + auto f32() noexcept(true) -> bool*; + auto f33() noexcept(false) -> bool*; + auto f34() noexcept -> bool* =delete; + auto f35() noexcept(true) -> bool* =delete; + auto f36() noexcept(false) -> bool* =delete; + auto f37() throw() -> bool*; + auto f38() throw() -> bool* =delete; + + auto f39() -> bool&; + auto f40() -> bool& =delete; + auto f41() noexcept -> bool&; + auto f42() noexcept(true) -> bool&; + auto f43() noexcept(false) -> bool&; + auto f44() noexcept -> bool& =delete; + auto f45() noexcept(true) -> bool& =delete; + auto f46() noexcept(false) -> bool& =delete; + auto f47() throw() -> bool&; + auto f48() throw() -> bool& =delete; + + auto f49() const -> bool*; + auto f50() const -> bool* =delete; + auto f51() const noexcept -> bool*; + auto f52() const noexcept(true) -> bool*; + auto f53() const noexcept(false) -> bool*; + auto f54() const noexcept -> bool* =delete; + auto f55() const noexcept(true) -> bool* =delete; + auto f56() const noexcept(false) -> bool* =delete; + auto f57() const throw() -> bool*; + auto f58() const throw() -> bool* =delete; + + auto f59() const -> bool&; + auto f60() const -> bool& =delete; + auto f61() const noexcept -> bool&; + auto f62() const noexcept(true) -> bool&; + auto f63() const noexcept(false) -> bool&; + auto f64() const noexcept -> bool& =delete; + auto f65() const noexcept(true) -> bool& =delete; + auto f66() const noexcept(false) -> bool& =delete; + auto f67() const throw() -> bool&; + auto f68() const throw() -> bool& =delete; +}; + +struct Bar +{ + Bar() : m_func([](void*) -> result_t { + return magic; + }) {} +}; + +void foo() +{ + auto l = [](int n) -> x_t { + return n + 5; + }; + x([](int n) -> x_t { + return n + 5; + }); +} + +static auto f25() -> bool { + return true; +} + +static auto f26() const noexcept(true) -> bool { + return true; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31403-trailing_return_byref_ptr.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31403-trailing_return_byref_ptr.cpp new file mode 100644 index 00000000..9b7da565 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31403-trailing_return_byref_ptr.cpp @@ -0,0 +1,84 @@ +struct Foo +{ + auto f01() -> bool; + auto f02() noexcept -> bool; + auto f03() noexcept(true) -> bool; + auto f04() noexcept(false) -> bool; + auto f05() noexcept -> bool = delete; + auto f06() noexcept(true) -> bool = delete; + auto f07() noexcept(false) -> bool = delete; + + auto f11() const -> bool; + auto f12() const noexcept -> bool; + auto f13() const noexcept(true) -> bool; + auto f14() const noexcept(false) -> bool; + auto f15() const noexcept -> bool = delete; + auto f16() const noexcept(true) -> bool = delete; + auto f17() const noexcept(false) -> bool = delete; + + auto f21() throw() -> bool; + auto f22() throw() -> bool = delete; + auto f23() const throw() -> bool; + auto f24() const throw() -> bool = delete; + + auto f25() const -> bool*; + auto f26() const -> bool* = delete; + auto f27() const -> bool&; + auto f28() const -> bool& = delete; + + auto f29() -> bool*; + auto f30() -> bool* = delete; + auto f31() noexcept -> bool*; + auto f32() noexcept(true) -> bool*; + auto f33() noexcept(false) -> bool*; + auto f34() noexcept -> bool* = delete; + auto f35() noexcept(true) -> bool* = delete; + auto f36() noexcept(false) -> bool* = delete; + auto f37() throw() -> bool*; + auto f38() throw() -> bool* = delete; + + auto f39() -> bool&; + auto f40() -> bool& = delete; + auto f41() noexcept -> bool&; + auto f42() noexcept(true) -> bool&; + auto f43() noexcept(false) -> bool&; + auto f44() noexcept -> bool& = delete; + auto f45() noexcept(true) -> bool& = delete; + auto f46() noexcept(false) -> bool& = delete; + auto f47() throw() -> bool&; + auto f48() throw() -> bool& = delete; + + auto f49() const -> bool*; + auto f50() const -> bool* = delete; + auto f51() const noexcept -> bool*; + auto f52() const noexcept(true) -> bool*; + auto f53() const noexcept(false) -> bool*; + auto f54() const noexcept -> bool* = delete; + auto f55() const noexcept(true) -> bool* = delete; + auto f56() const noexcept(false) -> bool* = delete; + auto f57() const throw() -> bool*; + auto f58() const throw() -> bool* = delete; + + auto f59() const -> bool&; + auto f60() const -> bool& = delete; + auto f61() const noexcept -> bool&; + auto f62() const noexcept(true) -> bool&; + auto f63() const noexcept(false) -> bool&; + auto f64() const noexcept -> bool& = delete; + auto f65() const noexcept(true) -> bool& = delete; + auto f66() const noexcept(false) -> bool& = delete; + auto f67() const throw() -> bool&; + auto f68() const throw() -> bool& = delete; + + class Foo + { + auto operator=(const Foo&) -> Foo&; + auto operator=(const Foo&) noexcept -> Foo&; + + auto operator=(Foo const&) -> Foo&; + auto operator=(Foo const&) noexcept -> Foo&; + + auto operator=(Foo&&) -> Foo&; + auto operator=(Foo&&) noexcept -> Foo&; + } +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31404-trailing_return_byref_ptr.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31404-trailing_return_byref_ptr.cpp new file mode 100644 index 00000000..7ecf920d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31404-trailing_return_byref_ptr.cpp @@ -0,0 +1,84 @@ +struct Foo +{ + auto f01() -> bool; + auto f02() noexcept -> bool; + auto f03() noexcept(true) -> bool; + auto f04() noexcept(false) -> bool; + auto f05() noexcept -> bool = delete; + auto f06() noexcept(true) -> bool = delete; + auto f07() noexcept(false) -> bool = delete; + + auto f11() const -> bool; + auto f12() const noexcept -> bool; + auto f13() const noexcept(true) -> bool; + auto f14() const noexcept(false) -> bool; + auto f15() const noexcept -> bool = delete; + auto f16() const noexcept(true) -> bool = delete; + auto f17() const noexcept(false) -> bool = delete; + + auto f21() throw() -> bool; + auto f22() throw() -> bool = delete; + auto f23() const throw() -> bool; + auto f24() const throw() -> bool = delete; + + auto f25() const -> bool *; + auto f26() const -> bool * = delete; + auto f27() const -> bool &; + auto f28() const -> bool & = delete; + + auto f29() -> bool *; + auto f30() -> bool * = delete; + auto f31() noexcept -> bool *; + auto f32() noexcept(true) -> bool *; + auto f33() noexcept(false) -> bool *; + auto f34() noexcept -> bool * = delete; + auto f35() noexcept(true) -> bool * = delete; + auto f36() noexcept(false) -> bool * = delete; + auto f37() throw() -> bool *; + auto f38() throw() -> bool * = delete; + + auto f39() -> bool &; + auto f40() -> bool & = delete; + auto f41() noexcept -> bool &; + auto f42() noexcept(true) -> bool &; + auto f43() noexcept(false) -> bool &; + auto f44() noexcept -> bool & = delete; + auto f45() noexcept(true) -> bool & = delete; + auto f46() noexcept(false) -> bool & = delete; + auto f47() throw() -> bool &; + auto f48() throw() -> bool & = delete; + + auto f49() const -> bool *; + auto f50() const -> bool * = delete; + auto f51() const noexcept -> bool *; + auto f52() const noexcept(true) -> bool *; + auto f53() const noexcept(false) -> bool *; + auto f54() const noexcept -> bool * = delete; + auto f55() const noexcept(true) -> bool * = delete; + auto f56() const noexcept(false) -> bool * = delete; + auto f57() const throw() -> bool *; + auto f58() const throw() -> bool * = delete; + + auto f59() const -> bool &; + auto f60() const -> bool & = delete; + auto f61() const noexcept -> bool &; + auto f62() const noexcept(true) -> bool &; + auto f63() const noexcept(false) -> bool &; + auto f64() const noexcept -> bool & = delete; + auto f65() const noexcept(true) -> bool & = delete; + auto f66() const noexcept(false) -> bool & = delete; + auto f67() const throw() -> bool &; + auto f68() const throw() -> bool & = delete; + + class Foo + { + auto operator=(const Foo &) -> Foo &; + auto operator=(const Foo &) noexcept -> Foo &; + + auto operator=(Foo const &) -> Foo &; + auto operator=(Foo const &) noexcept -> Foo &; + + auto operator=(Foo &&) -> Foo &; + auto operator=(Foo &&) noexcept -> Foo &; + } +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31450-indent_func_alias_prototype.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31450-indent_func_alias_prototype.cpp new file mode 100644 index 00000000..472f66b3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31450-indent_func_alias_prototype.cpp @@ -0,0 +1,55 @@ +
+using Fun1 = void ( );
+using Fun2 = void ( ) noexcept;
+
+using Fun1a = void (
+ );
+
+using Fun2a = void (
+ ) noexcept;
+
+using Fun3a = void (
+ int a,
+ const char*
+ );
+
+using Fun4a = void (
+ int a,
+ const char*
+ ) noexcept;
+
+using Fun5a = void (
+ int a,
+ const char*
+ );
+
+using Fun6a = void (
+ int a,
+ const char*
+ ) noexcept;
+
+using Fun1b = auto (
+ )->int;
+
+using Fun2b = auto (
+ ) noexcept->int;
+
+using Fun3b = auto (
+ int a,
+ const char*
+ )->int;
+
+using Fun4b = auto (
+ int a,
+ const char*
+ ) noexcept->int;
+
+using Fun5b = auto (
+ int a,
+ const char*
+ )->int;
+
+using Fun6b = auto (
+ int a,
+ const char*
+ ) noexcept->int;
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31451-indent_func_alias_prototype.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31451-indent_func_alias_prototype.cpp new file mode 100644 index 00000000..2288f111 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31451-indent_func_alias_prototype.cpp @@ -0,0 +1,55 @@ +
+using Fun1 = void ( );
+using Fun2 = void ( ) noexcept;
+
+using Fun1a = void (
+ );
+
+using Fun2a = void (
+ ) noexcept;
+
+using Fun3a = void (
+ int a,
+ const char*
+ );
+
+using Fun4a = void (
+ int a,
+ const char*
+ ) noexcept;
+
+using Fun5a = void (
+ int a,
+ const char*
+ );
+
+using Fun6a = void (
+ int a,
+ const char*
+ ) noexcept;
+
+using Fun1b = auto (
+ )->int;
+
+using Fun2b = auto (
+ ) noexcept->int;
+
+using Fun3b = auto (
+ int a,
+ const char*
+ )->int;
+
+using Fun4b = auto (
+ int a,
+ const char*
+ ) noexcept->int;
+
+using Fun5b = auto (
+ int a,
+ const char*
+ )->int;
+
+using Fun6b = auto (
+ int a,
+ const char*
+ ) noexcept->int;
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31452-indent_func_alias_prototype.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31452-indent_func_alias_prototype.cpp new file mode 100644 index 00000000..018b3dd6 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31452-indent_func_alias_prototype.cpp @@ -0,0 +1,55 @@ +
+using Fun1 = void ( );
+using Fun2 = void ( ) noexcept;
+
+using Fun1a = void (
+);
+
+using Fun2a = void (
+) noexcept;
+
+using Fun3a = void (
+ int a,
+ const char*
+);
+
+using Fun4a = void (
+ int a,
+ const char*
+) noexcept;
+
+using Fun5a = void (
+ int a,
+ const char*
+);
+
+using Fun6a = void (
+ int a,
+ const char*
+) noexcept;
+
+using Fun1b = auto (
+)->int;
+
+using Fun2b = auto (
+) noexcept->int;
+
+using Fun3b = auto (
+ int a,
+ const char*
+)->int;
+
+using Fun4b = auto (
+ int a,
+ const char*
+) noexcept->int;
+
+using Fun5b = auto (
+ int a,
+ const char*
+)->int;
+
+using Fun6b = auto (
+ int a,
+ const char*
+) noexcept->int;
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31562-sf562.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31562-sf562.cpp new file mode 100644 index 00000000..15ee8e79 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31562-sf562.cpp @@ -0,0 +1,9 @@ +#include "bar.h" + +class Foo : public Bar { + int foo(int bar) const { + while (true) { + baz(&operator[](bar)); + } + } +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31567-sf567.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31567-sf567.cpp new file mode 100644 index 00000000..6d96731d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31567-sf567.cpp @@ -0,0 +1,16 @@ +package com.temp.test; + +public class Database +{ +private Database(String fileName) +{ + readConfig(fileName, "asdfasdf", 1); + readConfig(ame, "aasdf", 1); + + Database::readConfig(fileName, "asdfasdf", 1); + Database::readConfig(ame, "aasdf", 1); + + ::readConfig(fileName, "asdfasdf", 1); + ::readConfig(ame, "aasdf", 1); +} +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31568-Issue_2368.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31568-Issue_2368.cpp new file mode 100644 index 00000000..82b8c59c --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31568-Issue_2368.cpp @@ -0,0 +1,10 @@ +void Func1() +{ + OtherFunc( 5, b ); +} + +void Func2() +{ + Func3( p1, p2, p3 ); + Func3( p111, p222, p333 ); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31583-sf583.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31583-sf583.cpp new file mode 100644 index 00000000..34fc0c21 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31583-sf583.cpp @@ -0,0 +1,6 @@ +#include <utility> + +std::pair<int, int> make_pair(int first, int second) +{ + return {first, second}; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31593-sf593.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31593-sf593.cpp new file mode 100644 index 00000000..2d4499e6 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31593-sf593.cpp @@ -0,0 +1,11 @@ +typedef boost::shared_ptr < RatherLongClassName > sp_RatherLongClassName_t; +int main() +{ + int argument = 1; + sp_RatherLongClassName_t ratherLongVariableName1(new RatherLongClassName(argument, + argument, argument)); + + int the_result = a_very_long_function_name_taking_most_of_the_line(argument, + argument, argument); + return 0; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31594-issue_672.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31594-issue_672.cpp new file mode 100644 index 00000000..499f3168 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31594-issue_672.cpp @@ -0,0 +1,10 @@ +class + MyClass +{ +public: + void f123(MyType1 AAAAAAAAAAAAAA, MyType2 BBBBBBBBBBBB, + int XXXXXXXXXXXXXXX); + void foo(::some::very::looong::_and::complicated::name::MyType& a, + ::some::very::looong::_and::complicated::name::MyType& b, + some::very::looong::_and::complicated::name::MyType& c); +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31595-issue_1778.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31595-issue_1778.cpp new file mode 100644 index 00000000..4eea46e0 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31595-issue_1778.cpp @@ -0,0 +1,7 @@ +using x = Foo::foo_t; + +using a1 = decltype( &Foo::operator() ); +using a2 = Bar<decltype( &Foo::operator() )>; + +using b1 = decltype( *Foo::y ); +using b2 = Bar<decltype( *Foo::y )>; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31596-issue_1782.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31596-issue_1782.cpp new file mode 100644 index 00000000..664ead7f --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31596-issue_1782.cpp @@ -0,0 +1,20 @@ +using a1 = decltype( bar() ); +using b1 = decltype( bar< int >() ); +using c1 = decltype( foo::bar< int >() ); +using d1 = decltype( *( bar< int >() ) ); +using e1 = decltype( *( foo::bar< int >() ) ); + +using a2 = decltype( bar() ); +using b2 = decltype( bar< int >() ); +using c2 = decltype( foo::bar< int >() ); +using d2 = decltype( *( bar< int >() ) ); +using e2 = decltype( *( foo::bar< int >() ) ); + +using a3 = decltype( bar(0) ); +using b3 = decltype( bar< int >(0) ); +using c3 = decltype( foo::bar< int >(0) ); +using d3 = decltype( *( bar< int >(0) ) ); +using e3 = decltype( *( foo::bar< int >(0) ) ); + +using x1 = decltype( ( 0 ) ); +using x2 = decltype( ( 0 ) ); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31597-issue_1804.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31597-issue_1804.cpp new file mode 100644 index 00000000..c98ecdef --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31597-issue_1804.cpp @@ -0,0 +1,2 @@ +void foo1( int ( & x ) [ 2 ] ); +void foo2( int ( & x ) [ 2 ] ); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31598-Issue_1753.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31598-Issue_1753.cpp new file mode 100644 index 00000000..9f7da399 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31598-Issue_1753.cpp @@ -0,0 +1,9 @@ +void x() +{ + a = c0 * d0(); + a = b ? c + d : e; + a = b ? c * d : e; + a = b ? c + d() : e; + a = b1 ? c1 * d1() : e1; + a = b2 ? c2() * d2 : e2; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31599-parameter-packs.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31599-parameter-packs.cpp new file mode 100644 index 00000000..4961aa2b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31599-parameter-packs.cpp @@ -0,0 +1,77 @@ +template<typename ... A, int... B> +struct foo1 : foo1<A..., (sizeof...(A)+B)...> +{ + foo1() { + int x = sizeof...(A); + } +}; + +template<int... X> int bar1() +{ + auto s = sizeof...(X); + chomp(X)...; + return X+...; +} + +template<class R, typename ... Args> +void call1v(R (*fp)(Args...)); + +template<class R, typename ... Args> +void call1p(R (*fp)(Args*...)); + +template<class R, typename ... Args> +void call1r(R (*fp)(Args && ...)); + +template<class R, typename ... Args> +struct invoke1v : invoke<R (*)(Args...)> +{ +}; + +template<class R, typename ... Args> +struct invoke1p : invoke<R (*)(Args*...)> +{ +}; + +template<class R, typename ... Args> +struct invoke1r : invoke<R (*)(Args && ...)> +{ +}; + +template < typename ... A, int ... B > +struct foo2 : foo2 < A ..., ( sizeof ... ( A ) + B ) ... > +{ + foo2() { + int x = sizeof ... ( A ); + } +}; + +template < int ... X > int bar2() +{ + auto s = sizeof ... ( X ); + chomp( X ) ...; + return X + ...; +} + +template < class R, typename ... Args > +void call2v( R ( *fp ) ( Args ... ) ); + +template < class R, typename ... Args > +void call2p( R ( *fp ) ( Args * ... ) ); + +template < class R, typename ... Args > +void call2r( R ( *fp ) ( Args && ... ) ); + +template < class R, typename ... Args > +struct invoke2v : invoke < R ( * ) ( Args ... ) > +{ +}; + +template < class R, typename ... Args > +struct invoke2p : invoke < R ( * ) ( Args * ... ) > +{ +}; + +template < class R, typename ... Args > +struct invoke2r : invoke < R ( * ) ( Args && ... ) > +{ +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31600-parameter-packs.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31600-parameter-packs.cpp new file mode 100644 index 00000000..5d1cd8e8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31600-parameter-packs.cpp @@ -0,0 +1,77 @@ +template<typename ... A, int... B> +struct foo1 : foo1<A..., (sizeof...(A)+B) ...> +{ + foo1() { + int x = sizeof...(A); + } +}; + +template<int... X> int bar1() +{ + auto s = sizeof...(X); + chomp(X) ...; + return X+...; +} + +template<class R, typename ... Args> +void call1v(R (*fp)(Args...)); + +template<class R, typename ... Args> +void call1p(R (*fp)(Args*...)); + +template<class R, typename ... Args> +void call1r(R (*fp)(Args && ...)); + +template<class R, typename ... Args> +struct invoke1v : invoke<R (*)(Args...)> +{ +}; + +template<class R, typename ... Args> +struct invoke1p : invoke<R (*)(Args*...)> +{ +}; + +template<class R, typename ... Args> +struct invoke1r : invoke<R (*)(Args && ...)> +{ +}; + +template < typename ... A, int ... B > +struct foo2 : foo2 < A ..., ( sizeof ... ( A ) + B ) ... > +{ + foo2() { + int x = sizeof ... ( A ); + } +}; + +template < int ... X > int bar2() +{ + auto s = sizeof ... ( X ); + chomp( X ) ...; + return X + ...; +} + +template < class R, typename ... Args > +void call2v( R ( *fp ) ( Args ... ) ); + +template < class R, typename ... Args > +void call2p( R ( *fp ) ( Args * ... ) ); + +template < class R, typename ... Args > +void call2r( R ( *fp ) ( Args && ... ) ); + +template < class R, typename ... Args > +struct invoke2v : invoke < R ( * ) ( Args ... ) > +{ +}; + +template < class R, typename ... Args > +struct invoke2p : invoke < R ( * ) ( Args * ... ) > +{ +}; + +template < class R, typename ... Args > +struct invoke2r : invoke < R ( * ) ( Args && ... ) > +{ +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31601-parameter-packs.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31601-parameter-packs.cpp new file mode 100644 index 00000000..0394fe8b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31601-parameter-packs.cpp @@ -0,0 +1,77 @@ +template<typename ... A, int... B> +struct foo1 : foo1<A..., (sizeof...(A)+B)...> +{ + foo1() { + int x = sizeof...(A); + } +}; + +template<int... X> int bar1() +{ + auto s = sizeof...(X); + chomp(X)...; + return X+...; +} + +template<class R, typename ... Args> +void call1v(R (*fp)(Args...)); + +template<class R, typename ... Args> +void call1p(R (*fp)(Args*...)); + +template<class R, typename ... Args> +void call1r(R (*fp)(Args&&...)); + +template<class R, typename ... Args> +struct invoke1v : invoke<R (*)(Args...)> +{ +}; + +template<class R, typename ... Args> +struct invoke1p : invoke<R (*)(Args*...)> +{ +}; + +template<class R, typename ... Args> +struct invoke1r : invoke<R (*)(Args&&...)> +{ +}; + +template < typename ... A, int ... B > +struct foo2 : foo2 < A ..., ( sizeof ... ( A ) + B )... > +{ + foo2() { + int x = sizeof ... ( A ); + } +}; + +template < int ... X > int bar2() +{ + auto s = sizeof ... ( X ); + chomp( X )...; + return X + ...; +} + +template < class R, typename ... Args > +void call2v( R ( *fp ) ( Args ... ) ); + +template < class R, typename ... Args > +void call2p( R ( *fp ) ( Args * ... ) ); + +template < class R, typename ... Args > +void call2r( R ( *fp ) ( Args && ... ) ); + +template < class R, typename ... Args > +struct invoke2v : invoke < R ( * ) ( Args ... ) > +{ +}; + +template < class R, typename ... Args > +struct invoke2p : invoke < R ( * ) ( Args * ... ) > +{ +}; + +template < class R, typename ... Args > +struct invoke2r : invoke < R ( * ) ( Args && ... ) > +{ +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31602-parameter-packs.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31602-parameter-packs.cpp new file mode 100644 index 00000000..15d0a382 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31602-parameter-packs.cpp @@ -0,0 +1,77 @@ +template<typename ... A, int... B> +struct foo1 : foo1<A..., (sizeof ...(A)+B)...> +{ + foo1() { + int x = sizeof ...(A); + } +}; + +template<int... X> int bar1() +{ + auto s = sizeof ...(X); + chomp(X)...; + return X+...; +} + +template<class R, typename ... Args> +void call1v(R (*fp)(Args...)); + +template<class R, typename ... Args> +void call1p(R (*fp)(Args*...)); + +template<class R, typename ... Args> +void call1r(R (*fp)(Args&&...)); + +template<class R, typename ... Args> +struct invoke1v : invoke<R (*)(Args...)> +{ +}; + +template<class R, typename ... Args> +struct invoke1p : invoke<R (*)(Args*...)> +{ +}; + +template<class R, typename ... Args> +struct invoke1r : invoke<R (*)(Args&&...)> +{ +}; + +template < typename ... A, int ... B > +struct foo2 : foo2 < A ..., ( sizeof ... ( A ) + B ) ... > +{ + foo2() { + int x = sizeof ... ( A ); + } +}; + +template < int ... X > int bar2() +{ + auto s = sizeof ... ( X ); + chomp( X ) ...; + return X + ...; +} + +template < class R, typename ... Args > +void call2v( R ( *fp ) ( Args ... ) ); + +template < class R, typename ... Args > +void call2p( R ( *fp ) ( Args * ... ) ); + +template < class R, typename ... Args > +void call2r( R ( *fp ) ( Args && ... ) ); + +template < class R, typename ... Args > +struct invoke2v : invoke < R ( * ) ( Args ... ) > +{ +}; + +template < class R, typename ... Args > +struct invoke2p : invoke < R ( * ) ( Args * ... ) > +{ +}; + +template < class R, typename ... Args > +struct invoke2r : invoke < R ( * ) ( Args && ... ) > +{ +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31603-parameter-packs.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31603-parameter-packs.cpp new file mode 100644 index 00000000..3a810b8a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31603-parameter-packs.cpp @@ -0,0 +1,77 @@ +template<typename ... A, int... B> +struct foo1 : foo1<A..., (sizeof...(A)+B)...> +{ + foo1() { + int x = sizeof...(A); + } +}; + +template<int... X> int bar1() +{ + auto s = sizeof...(X); + chomp(X)...; + return X+...; +} + +template<class R, typename ... Args> +void call1v(R (*fp)(Args...)); + +template<class R, typename ... Args> +void call1p(R (*fp)(Args*...)); + +template<class R, typename ... Args> +void call1r(R (*fp)(Args&&...)); + +template<class R, typename ... Args> +struct invoke1v : invoke<R (*)(Args...)> +{ +}; + +template<class R, typename ... Args> +struct invoke1p : invoke<R (*)(Args*...)> +{ +}; + +template<class R, typename ... Args> +struct invoke1r : invoke<R (*)(Args&&...)> +{ +}; + +template < typename ... A, int ... B > +struct foo2 : foo2 < A ..., ( sizeof... ( A ) + B ) ... > +{ + foo2() { + int x = sizeof... ( A ); + } +}; + +template < int ... X > int bar2() +{ + auto s = sizeof... ( X ); + chomp( X ) ...; + return X + ...; +} + +template < class R, typename ... Args > +void call2v( R ( *fp ) ( Args ... ) ); + +template < class R, typename ... Args > +void call2p( R ( *fp ) ( Args * ... ) ); + +template < class R, typename ... Args > +void call2r( R ( *fp ) ( Args && ... ) ); + +template < class R, typename ... Args > +struct invoke2v : invoke < R ( * ) ( Args ... ) > +{ +}; + +template < class R, typename ... Args > +struct invoke2p : invoke < R ( * ) ( Args * ... ) > +{ +}; + +template < class R, typename ... Args > +struct invoke2r : invoke < R ( * ) ( Args && ... ) > +{ +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31604-parameter-packs.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31604-parameter-packs.cpp new file mode 100644 index 00000000..2a180b34 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31604-parameter-packs.cpp @@ -0,0 +1,77 @@ +template<typename ... A, int... B> +struct foo1 : foo1<A ..., (sizeof...(A)+B)...> +{ + foo1() { + int x = sizeof...(A); + } +}; + +template<int... X> int bar1() +{ + auto s = sizeof...(X); + chomp(X)...; + return X+...; +} + +template<class R, typename ... Args> +void call1v(R (*fp)(Args ...)); + +template<class R, typename ... Args> +void call1p(R (*fp)(Args*...)); + +template<class R, typename ... Args> +void call1r(R (*fp)(Args && ...)); + +template<class R, typename ... Args> +struct invoke1v : invoke<R (*)(Args ...)> +{ +}; + +template<class R, typename ... Args> +struct invoke1p : invoke<R (*)(Args*...)> +{ +}; + +template<class R, typename ... Args> +struct invoke1r : invoke<R (*)(Args && ...)> +{ +}; + +template < typename ... A, int ... B > +struct foo2 : foo2 < A ..., ( sizeof ... ( A ) + B ) ... > +{ + foo2() { + int x = sizeof ... ( A ); + } +}; + +template < int ... X > int bar2() +{ + auto s = sizeof ... ( X ); + chomp( X ) ...; + return X + ...; +} + +template < class R, typename ... Args > +void call2v( R ( *fp ) ( Args ... ) ); + +template < class R, typename ... Args > +void call2p( R ( *fp ) ( Args * ... ) ); + +template < class R, typename ... Args > +void call2r( R ( *fp ) ( Args && ... ) ); + +template < class R, typename ... Args > +struct invoke2v : invoke < R ( * ) ( Args ... ) > +{ +}; + +template < class R, typename ... Args > +struct invoke2p : invoke < R ( * ) ( Args * ... ) > +{ +}; + +template < class R, typename ... Args > +struct invoke2r : invoke < R ( * ) ( Args && ... ) > +{ +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31605-parameter-packs.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31605-parameter-packs.cpp new file mode 100644 index 00000000..a08af3cf --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31605-parameter-packs.cpp @@ -0,0 +1,77 @@ +template<typename... A, int... B> +struct foo1 : foo1<A..., (sizeof...(A)+B)...> +{ + foo1() { + int x = sizeof...(A); + } +}; + +template<int... X> int bar1() +{ + auto s = sizeof...(X); + chomp(X)...; + return X+...; +} + +template<class R, typename... Args> +void call1v(R (*fp)(Args...)); + +template<class R, typename... Args> +void call1p(R (*fp)(Args*...)); + +template<class R, typename... Args> +void call1r(R (*fp)(Args && ...)); + +template<class R, typename... Args> +struct invoke1v : invoke<R (*)(Args...)> +{ +}; + +template<class R, typename... Args> +struct invoke1p : invoke<R (*)(Args*...)> +{ +}; + +template<class R, typename... Args> +struct invoke1r : invoke<R (*)(Args && ...)> +{ +}; + +template < typename... A, int ... B > +struct foo2 : foo2 < A ..., ( sizeof ... ( A ) + B ) ... > +{ + foo2() { + int x = sizeof ... ( A ); + } +}; + +template < int ... X > int bar2() +{ + auto s = sizeof ... ( X ); + chomp( X ) ...; + return X + ...; +} + +template < class R, typename... Args > +void call2v( R ( *fp ) ( Args... ) ); + +template < class R, typename... Args > +void call2p( R ( *fp ) ( Args * ... ) ); + +template < class R, typename... Args > +void call2r( R ( *fp ) ( Args && ... ) ); + +template < class R, typename... Args > +struct invoke2v : invoke < R ( * ) ( Args... ) > +{ +}; + +template < class R, typename... Args > +struct invoke2p : invoke < R ( * ) ( Args * ... ) > +{ +}; + +template < class R, typename... Args > +struct invoke2r : invoke < R ( * ) ( Args && ... ) > +{ +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31606-parameter-packs.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31606-parameter-packs.cpp new file mode 100644 index 00000000..a73e2c43 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31606-parameter-packs.cpp @@ -0,0 +1,77 @@ +template<typename ... A, int ... B> +struct foo1 : foo1<A ..., (sizeof...(A)+B)...> +{ + foo1() { + int x = sizeof...(A); + } +}; + +template<int ... X> int bar1() +{ + auto s = sizeof...(X); + chomp(X)...; + return X+...; +} + +template<class R, typename ... Args> +void call1v(R (*fp)(Args ...)); + +template<class R, typename ... Args> +void call1p(R (*fp)(Args* ...)); + +template<class R, typename ... Args> +void call1r(R (*fp)(Args && ...)); + +template<class R, typename ... Args> +struct invoke1v : invoke<R (*)(Args ...)> +{ +}; + +template<class R, typename ... Args> +struct invoke1p : invoke<R (*)(Args* ...)> +{ +}; + +template<class R, typename ... Args> +struct invoke1r : invoke<R (*)(Args && ...)> +{ +}; + +template < typename ... A, int ... B > +struct foo2 : foo2 < A ..., ( sizeof ... ( A ) + B ) ... > +{ + foo2() { + int x = sizeof ... ( A ); + } +}; + +template < int ... X > int bar2() +{ + auto s = sizeof ... ( X ); + chomp( X ) ...; + return X + ...; +} + +template < class R, typename ... Args > +void call2v( R ( *fp ) ( Args ... ) ); + +template < class R, typename ... Args > +void call2p( R ( *fp ) ( Args * ... ) ); + +template < class R, typename ... Args > +void call2r( R ( *fp ) ( Args && ... ) ); + +template < class R, typename ... Args > +struct invoke2v : invoke < R ( * ) ( Args ... ) > +{ +}; + +template < class R, typename ... Args > +struct invoke2p : invoke < R ( * ) ( Args * ... ) > +{ +}; + +template < class R, typename ... Args > +struct invoke2r : invoke < R ( * ) ( Args && ... ) > +{ +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31607-parameter-packs.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31607-parameter-packs.cpp new file mode 100644 index 00000000..153fc615 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31607-parameter-packs.cpp @@ -0,0 +1,77 @@ +template<typename ... A, int... B> +struct foo1 : foo1<A ..., (sizeof...(A)+B)...> +{ + foo1() { + int x = sizeof...(A); + } +}; + +template<int... X> int bar1() +{ + auto s = sizeof...(X); + chomp(X)...; + return X+...; +} + +template<class R, typename ... Args> +void call1v(R (*fp)(Args ...)); + +template<class R, typename ... Args> +void call1p(R (*fp)(Args* ...)); + +template<class R, typename ... Args> +void call1r(R (*fp)(Args && ...)); + +template<class R, typename ... Args> +struct invoke1v : invoke<R (*)(Args ...)> +{ +}; + +template<class R, typename ... Args> +struct invoke1p : invoke<R (*)(Args* ...)> +{ +}; + +template<class R, typename ... Args> +struct invoke1r : invoke<R (*)(Args && ...)> +{ +}; + +template < typename ... A, int... B > +struct foo2 : foo2 < A..., ( sizeof ... ( A ) + B ) ... > +{ + foo2() { + int x = sizeof ... ( A ); + } +}; + +template < int... X > int bar2() +{ + auto s = sizeof ... ( X ); + chomp( X ) ...; + return X + ...; +} + +template < class R, typename ... Args > +void call2v( R ( *fp ) ( Args ... ) ); + +template < class R, typename ... Args > +void call2p( R ( *fp ) ( Args * ... ) ); + +template < class R, typename ... Args > +void call2r( R ( *fp ) ( Args && ... ) ); + +template < class R, typename ... Args > +struct invoke2v : invoke < R ( * ) ( Args ... ) > +{ +}; + +template < class R, typename ... Args > +struct invoke2p : invoke < R ( * ) ( Args * ... ) > +{ +}; + +template < class R, typename ... Args > +struct invoke2r : invoke < R ( * ) ( Args && ... ) > +{ +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31608-parameter-packs.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31608-parameter-packs.cpp new file mode 100644 index 00000000..13ba49db --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31608-parameter-packs.cpp @@ -0,0 +1,77 @@ +template<typename ... A, int... B> +struct foo1 : foo1<A..., (sizeof... (A)+B)...> +{ + foo1() { + int x = sizeof... (A); + } +}; + +template<int... X> int bar1() +{ + auto s = sizeof... (X); + chomp(X)...; + return X+...; +} + +template<class R, typename ... Args> +void call1v(R (*fp)(Args...)); + +template<class R, typename ... Args> +void call1p(R (*fp)(Args*...)); + +template<class R, typename ... Args> +void call1r(R (*fp)(Args&&...)); + +template<class R, typename ... Args> +struct invoke1v : invoke<R (*)(Args...)> +{ +}; + +template<class R, typename ... Args> +struct invoke1p : invoke<R (*)(Args*...)> +{ +}; + +template<class R, typename ... Args> +struct invoke1r : invoke<R (*)(Args&&...)> +{ +}; + +template < typename ... A, int ... B > +struct foo2 : foo2 < A ..., ( sizeof ... ( A ) + B ) ... > +{ + foo2() { + int x = sizeof ... ( A ); + } +}; + +template < int ... X > int bar2() +{ + auto s = sizeof ... ( X ); + chomp( X ) ...; + return X + ...; +} + +template < class R, typename ... Args > +void call2v( R ( *fp ) ( Args ... ) ); + +template < class R, typename ... Args > +void call2p( R ( *fp ) ( Args * ... ) ); + +template < class R, typename ... Args > +void call2r( R ( *fp ) ( Args && ... ) ); + +template < class R, typename ... Args > +struct invoke2v : invoke < R ( * ) ( Args ... ) > +{ +}; + +template < class R, typename ... Args > +struct invoke2p : invoke < R ( * ) ( Args * ... ) > +{ +}; + +template < class R, typename ... Args > +struct invoke2r : invoke < R ( * ) ( Args && ... ) > +{ +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31609-parameter-packs.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31609-parameter-packs.cpp new file mode 100644 index 00000000..e00841b4 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31609-parameter-packs.cpp @@ -0,0 +1,77 @@ +template<typename ... A, int... B> +struct foo1 : foo1<A..., (sizeof...(A)+B)...> +{ + foo1() { + int x = sizeof...(A); + } +}; + +template<int... X> int bar1() +{ + auto s = sizeof...(X); + chomp(X)...; + return X+...; +} + +template<class R, typename ... Args> +void call1v(R (*fp)(Args...)); + +template<class R, typename ... Args> +void call1p(R (*fp)(Args*...)); + +template<class R, typename ... Args> +void call1r(R (*fp)(Args&&...)); + +template<class R, typename ... Args> +struct invoke1v : invoke<R (*)(Args...)> +{ +}; + +template<class R, typename ... Args> +struct invoke1p : invoke<R (*)(Args*...)> +{ +}; + +template<class R, typename ... Args> +struct invoke1r : invoke<R (*)(Args&&...)> +{ +}; + +template < typename ... A, int ... B > +struct foo2 : foo2 < A ..., ( sizeof ...( A ) + B ) ... > +{ + foo2() { + int x = sizeof ...( A ); + } +}; + +template < int ... X > int bar2() +{ + auto s = sizeof ...( X ); + chomp( X ) ...; + return X + ...; +} + +template < class R, typename ... Args > +void call2v( R ( *fp ) ( Args ... ) ); + +template < class R, typename ... Args > +void call2p( R ( *fp ) ( Args * ... ) ); + +template < class R, typename ... Args > +void call2r( R ( *fp ) ( Args && ... ) ); + +template < class R, typename ... Args > +struct invoke2v : invoke < R ( * ) ( Args ... ) > +{ +}; + +template < class R, typename ... Args > +struct invoke2p : invoke < R ( * ) ( Args * ... ) > +{ +}; + +template < class R, typename ... Args > +struct invoke2r : invoke < R ( * ) ( Args && ... ) > +{ +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31610-Issue_2085.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31610-Issue_2085.cpp new file mode 100644 index 00000000..581f4db4 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31610-Issue_2085.cpp @@ -0,0 +1 @@ +typedef std::function<size_t (int arg)> Fail; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31611-parameter-packs.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31611-parameter-packs.cpp new file mode 100644 index 00000000..4e89022d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31611-parameter-packs.cpp @@ -0,0 +1,77 @@ +template<typename ... A, int... B> +struct foo1 : foo1<A..., (sizeof...(A)+B)...> +{ + foo1() { + int x = sizeof...(A); + } +}; + +template<int... X> int bar1() +{ + auto s = sizeof...(X); + chomp(X)...; + return X+...; +} + +template<class R, typename ... Args> +void call1v(R (*fp)(Args...)); + +template<class R, typename ... Args> +void call1p(R (*fp)(Args*...)); + +template<class R, typename ... Args> +void call1r(R (*fp)(Args&&...)); + +template<class R, typename ... Args> +struct invoke1v : invoke<R (*)(Args...)> +{ +}; + +template<class R, typename ... Args> +struct invoke1p : invoke<R (*)(Args*...)> +{ +}; + +template<class R, typename ... Args> +struct invoke1r : invoke<R (*)(Args&&...)> +{ +}; + +template < typename ... A, int ... B > +struct foo2 : foo2 < A ..., ( sizeof ... ( A ) + B ) ... > +{ + foo2() { + int x = sizeof ... ( A ); + } +}; + +template < int ... X > int bar2() +{ + auto s = sizeof ... ( X ); + chomp( X ) ...; + return X + ...; +} + +template < class R, typename ... Args > +void call2v( R ( *fp ) ( Args ... ) ); + +template < class R, typename ... Args > +void call2p( R ( *fp ) ( Args * ... ) ); + +template < class R, typename ... Args > +void call2r( R ( *fp ) ( Args && ... ) ); + +template < class R, typename ... Args > +struct invoke2v : invoke < R ( * ) ( Args ... ) > +{ +}; + +template < class R, typename ... Args > +struct invoke2p : invoke < R ( * ) ( Args * ... ) > +{ +}; + +template < class R, typename ... Args > +struct invoke2r : invoke < R ( * ) ( Args && ... ) > +{ +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31612-parameter-packs.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31612-parameter-packs.cpp new file mode 100644 index 00000000..4e89022d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31612-parameter-packs.cpp @@ -0,0 +1,77 @@ +template<typename ... A, int... B> +struct foo1 : foo1<A..., (sizeof...(A)+B)...> +{ + foo1() { + int x = sizeof...(A); + } +}; + +template<int... X> int bar1() +{ + auto s = sizeof...(X); + chomp(X)...; + return X+...; +} + +template<class R, typename ... Args> +void call1v(R (*fp)(Args...)); + +template<class R, typename ... Args> +void call1p(R (*fp)(Args*...)); + +template<class R, typename ... Args> +void call1r(R (*fp)(Args&&...)); + +template<class R, typename ... Args> +struct invoke1v : invoke<R (*)(Args...)> +{ +}; + +template<class R, typename ... Args> +struct invoke1p : invoke<R (*)(Args*...)> +{ +}; + +template<class R, typename ... Args> +struct invoke1r : invoke<R (*)(Args&&...)> +{ +}; + +template < typename ... A, int ... B > +struct foo2 : foo2 < A ..., ( sizeof ... ( A ) + B ) ... > +{ + foo2() { + int x = sizeof ... ( A ); + } +}; + +template < int ... X > int bar2() +{ + auto s = sizeof ... ( X ); + chomp( X ) ...; + return X + ...; +} + +template < class R, typename ... Args > +void call2v( R ( *fp ) ( Args ... ) ); + +template < class R, typename ... Args > +void call2p( R ( *fp ) ( Args * ... ) ); + +template < class R, typename ... Args > +void call2r( R ( *fp ) ( Args && ... ) ); + +template < class R, typename ... Args > +struct invoke2v : invoke < R ( * ) ( Args ... ) > +{ +}; + +template < class R, typename ... Args > +struct invoke2p : invoke < R ( * ) ( Args * ... ) > +{ +}; + +template < class R, typename ... Args > +struct invoke2r : invoke < R ( * ) ( Args && ... ) > +{ +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31613-parameter-packs.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31613-parameter-packs.cpp new file mode 100644 index 00000000..4e89022d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31613-parameter-packs.cpp @@ -0,0 +1,77 @@ +template<typename ... A, int... B> +struct foo1 : foo1<A..., (sizeof...(A)+B)...> +{ + foo1() { + int x = sizeof...(A); + } +}; + +template<int... X> int bar1() +{ + auto s = sizeof...(X); + chomp(X)...; + return X+...; +} + +template<class R, typename ... Args> +void call1v(R (*fp)(Args...)); + +template<class R, typename ... Args> +void call1p(R (*fp)(Args*...)); + +template<class R, typename ... Args> +void call1r(R (*fp)(Args&&...)); + +template<class R, typename ... Args> +struct invoke1v : invoke<R (*)(Args...)> +{ +}; + +template<class R, typename ... Args> +struct invoke1p : invoke<R (*)(Args*...)> +{ +}; + +template<class R, typename ... Args> +struct invoke1r : invoke<R (*)(Args&&...)> +{ +}; + +template < typename ... A, int ... B > +struct foo2 : foo2 < A ..., ( sizeof ... ( A ) + B ) ... > +{ + foo2() { + int x = sizeof ... ( A ); + } +}; + +template < int ... X > int bar2() +{ + auto s = sizeof ... ( X ); + chomp( X ) ...; + return X + ...; +} + +template < class R, typename ... Args > +void call2v( R ( *fp ) ( Args ... ) ); + +template < class R, typename ... Args > +void call2p( R ( *fp ) ( Args * ... ) ); + +template < class R, typename ... Args > +void call2r( R ( *fp ) ( Args && ... ) ); + +template < class R, typename ... Args > +struct invoke2v : invoke < R ( * ) ( Args ... ) > +{ +}; + +template < class R, typename ... Args > +struct invoke2p : invoke < R ( * ) ( Args * ... ) > +{ +}; + +template < class R, typename ... Args > +struct invoke2r : invoke < R ( * ) ( Args && ... ) > +{ +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31614-Issue_3309.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31614-Issue_3309.cpp new file mode 100644 index 00000000..d6dd1dac --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31614-Issue_3309.cpp @@ -0,0 +1 @@ +template<typename ... ARGS> void test(ARGS&&... args) {} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31615-Issue_3309.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31615-Issue_3309.cpp new file mode 100644 index 00000000..84ee58aa --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31615-Issue_3309.cpp @@ -0,0 +1 @@ +template<typename ... ARGS> void test(ARGS&&... args) {} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31616-Issue_3309.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31616-Issue_3309.cpp new file mode 100644 index 00000000..c269ddb0 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31616-Issue_3309.cpp @@ -0,0 +1 @@ +template<typename ...ARGS> void test(ARGS&&... args) {} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31620-sp_after_type.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31620-sp_after_type.cpp new file mode 100644 index 00000000..460c0dc2 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31620-sp_after_type.cpp @@ -0,0 +1,13 @@ +static int x1; +unsigned long int y1 = (unsigned short)0; +const int foo1(int x); + +foo((const int*)0); +static_cast<long long>(0); + +static int x2; +unsigned long int y2 = ( unsigned short ) 0; +const int foo2 ( int x ); + +foo ( ( const int * ) 0 ); +static_cast < long long > ( 0 ); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31621-sp_after_type.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31621-sp_after_type.cpp new file mode 100644 index 00000000..b1ffd02b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31621-sp_after_type.cpp @@ -0,0 +1,13 @@ +static int x1; +unsigned long int y1 = (unsigned short)0; +const int foo1(int x); + +foo((const int*)0); +static_cast<long long>(0); + +static int x2; +unsigned long int y2 = ( unsigned short ) 0; +const int foo2 ( int x ); + +foo ( ( const int * ) 0 ); +static_cast < long long > ( 0 ); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31622-sp_after_type.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31622-sp_after_type.cpp new file mode 100644 index 00000000..a924423a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31622-sp_after_type.cpp @@ -0,0 +1,13 @@ +static int x1; +unsigned long int y1 = (unsigned short) 0; +const int foo1(int x); + +foo((const int*) 0); +static_cast<long long>(0); + +static int x2; +unsigned long int y2 = ( unsigned short ) 0; +const int foo2 ( int x ); + +foo ( ( const int * ) 0 ); +static_cast < long long > ( 0 ); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31623-sp_after_type.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31623-sp_after_type.cpp new file mode 100644 index 00000000..5d923c27 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31623-sp_after_type.cpp @@ -0,0 +1,13 @@ +static int x1; +unsigned long int y1 = (unsigned short)0; +const int foo1(int x); + +foo((const int*)0); +static_cast<long long>(0); + +static int x2; +unsigned long int y2 = ( unsigned short )0; +const int foo2 ( int x ); + +foo ( ( const int * )0 ); +static_cast < long long > ( 0 ); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31624-sp_after_type.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31624-sp_after_type.cpp new file mode 100644 index 00000000..b66aba0c --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31624-sp_after_type.cpp @@ -0,0 +1,13 @@ +static int x1; +unsigned long int y1 = (unsigned short)0; +const int foo1(int x); + +foo((const int *)0); +static_cast<long long>(0); + +static int x2; +unsigned long int y2 = ( unsigned short ) 0; +const int foo2 ( int x ); + +foo ( ( const int * ) 0 ); +static_cast < long long > ( 0 ); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31625-sp_after_type.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31625-sp_after_type.cpp new file mode 100644 index 00000000..add7b57e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31625-sp_after_type.cpp @@ -0,0 +1,13 @@ +static int x1; +unsigned long int y1 = (unsigned short)0; +const int foo1(int x); + +foo((const int*)0); +static_cast<long long>(0); + +static int x2; +unsigned long int y2 = ( unsigned short ) 0; +const int foo2 ( int x ); + +foo ( ( const int* ) 0 ); +static_cast < long long > ( 0 ); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31626-issue_1916.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31626-issue_1916.cpp new file mode 100644 index 00000000..56ce6f4c --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31626-issue_1916.cpp @@ -0,0 +1,8 @@ +int x; + +decltype (x) y; +decltype (x) z = 5; + +decltype (char{5}) a = 'a'; + +using x_t = decltype (x); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31627-issue_1916.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31627-issue_1916.cpp new file mode 100644 index 00000000..f84334a4 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31627-issue_1916.cpp @@ -0,0 +1,8 @@ +int x; + +decltype(x) y; +decltype(x) z = 5; + +decltype(char{5}) a = 'a'; + +using x_t = decltype(x); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31628-issue_1916.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31628-issue_1916.cpp new file mode 100644 index 00000000..df2af994 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31628-issue_1916.cpp @@ -0,0 +1,8 @@ +int x; + +decltype (x) y; +decltype (x) z = 5; + +decltype (char{5}) a = 'a'; + +using x_t = decltype (x); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31629-issue_1916.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31629-issue_1916.cpp new file mode 100644 index 00000000..913f1e28 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31629-issue_1916.cpp @@ -0,0 +1,8 @@ +int x; + +decltype (x)y; +decltype (x)z = 5; + +decltype (char{5})a = 'a'; + +using x_t = decltype (x); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31630-issue_1916.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31630-issue_1916.cpp new file mode 100644 index 00000000..df2af994 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31630-issue_1916.cpp @@ -0,0 +1,8 @@ +int x; + +decltype (x) y; +decltype (x) z = 5; + +decltype (char{5}) a = 'a'; + +using x_t = decltype (x); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31631-issue_1916.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31631-issue_1916.cpp new file mode 100644 index 00000000..913f1e28 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31631-issue_1916.cpp @@ -0,0 +1,8 @@ +int x; + +decltype (x)y; +decltype (x)z = 5; + +decltype (char{5})a = 'a'; + +using x_t = decltype (x); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31632-issue_1916.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31632-issue_1916.cpp new file mode 100644 index 00000000..292b6837 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31632-issue_1916.cpp @@ -0,0 +1,8 @@ +int x; + +decltype (x) y; +decltype (x) z = 5; + +decltype (char{5}) a = 'a'; + +using x_t = decltype (x); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31633-sp_after_decltype.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31633-sp_after_decltype.cpp new file mode 100644 index 00000000..6a62e6f2 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31633-sp_after_decltype.cpp @@ -0,0 +1,8 @@ +int x; +char y; +auto x1 = decltype(x) {0}; +auto y1 = decltype(y) {'a'}; + +unsigned rows; +for (auto row = decltype(rows) {0}; row < rows; ++row) { +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31634-sp_after_decltype.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31634-sp_after_decltype.cpp new file mode 100644 index 00000000..c48543be --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31634-sp_after_decltype.cpp @@ -0,0 +1,8 @@ +int x; +char y; +auto x1 = decltype(x){0}; +auto y1 = decltype(y){'a'}; + +unsigned rows; +for (auto row = decltype(rows){0}; row < rows; ++row) { +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31635-sp_decltype.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31635-sp_decltype.cpp new file mode 100644 index 00000000..84b157f1 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31635-sp_decltype.cpp @@ -0,0 +1,2 @@ +#define foo(expr) (expr) +using x = decltype foo(int); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31636-Issue_1923.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31636-Issue_1923.cpp new file mode 100644 index 00000000..8c3ebe66 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31636-Issue_1923.cpp @@ -0,0 +1,5 @@ +int x1 = 0; +foobar long_x2 = 0; +foo<int> x3 = 0; +int x4[] = {1, 2, 3}; +decltype(x1) x5 = 0; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31637-Issue_3446.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31637-Issue_3446.cpp new file mode 100644 index 00000000..9577cfa8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31637-Issue_3446.cpp @@ -0,0 +1,18 @@ +Foo:: +Foo() { +} + +std::true_type blarg(); +template <typename T> +decltype(std::declval<T &>().put(foo, bar), std::true_type()) +has_module_api_(T && t); + +void +foo() +{ + using V = decltype(STD::declval<T &>().put(foo, bar), std::true_type()); +} + +template <typename T> +decltype(std::declval<T &>()./* ((( */ put(foo, bar), std::true_type()) +has_module_api_(T && t); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31660-issue_1919.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31660-issue_1919.cpp new file mode 100644 index 00000000..187065d6 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31660-issue_1919.cpp @@ -0,0 +1,15 @@ +void foo() +{ + int a; + vector<unsigned> b; + long c; + decltype(a) d; +} + +void bar() +{ + int a; + std::vector<unsigned> b; + long c; + decltype(a) d; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31661-Issue_3097.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31661-Issue_3097.cpp new file mode 100644 index 00000000..ede644ad --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31661-Issue_3097.cpp @@ -0,0 +1,19 @@ +void foo() +{ + for( unsigned p = 0; p < np; + ++p ) + { + double* o = bar[p]; + } + + int x = 42; +} + +void bar() +{ + // hello + int x = 42; + if( x ) foo; + + type::value_t y = 0; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31662-var_def_blks.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31662-var_def_blks.cpp new file mode 100644 index 00000000..016aacec --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31662-var_def_blks.cpp @@ -0,0 +1,32 @@ +unsigned a; +char b; +int bar(void); +unsigned c; +char d; +int foo(void) { + char buf[1000] = {0}; + size_t len; + float amount; + double remainder; + + bar(); + uint64_t quux; + uint64_t quack; + for (int i = 0; i < 1000; i++) { + uint64_t checksum; + double remainder; + buf[i] += len; + uint32_t xyzzy; + uint32_t quark; + } + float amount; + double remainder; + baz(); + uint32_t llama; + uint32_t treehouse; +} +char * w; +uint8_t x; +int baz(void); +long y; +int z; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31663-var_def_blks.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31663-var_def_blks.cpp new file mode 100644 index 00000000..256d0ed6 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31663-var_def_blks.cpp @@ -0,0 +1,45 @@ +unsigned a; +char b; +int bar(void); + + +unsigned c; +char d; +int foo(void) { + char buf[1000] = {0}; + size_t len; + float amount; + double remainder; + bar(); + + + uint64_t quux; + uint64_t quack; + for (int i = 0; i < 1000; i++) { + uint64_t checksum; + double remainder; + buf[i] += len; + + + uint32_t xyzzy; + uint32_t quark; + } + + + float amount; + double remainder; + baz(); + + + uint32_t llama; + uint32_t treehouse; +} + + +char * w; +uint8_t x; +int baz(void); + + +long y; +int z; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31664-var_def_blks.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31664-var_def_blks.cpp new file mode 100644 index 00000000..c54e1c94 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31664-var_def_blks.cpp @@ -0,0 +1,55 @@ +unsigned a; +char b; + + + + +int bar(void); +unsigned c; +char d; + + + + +int foo(void) { + char buf[1000] = {0}; + size_t len; + float amount; + double remainder; + bar(); + uint64_t quux; + uint64_t quack; + + + + + for (int i = 0; i < 1000; i++) { + uint64_t checksum; + double remainder; + + + + + buf[i] += len; + uint32_t xyzzy; + uint32_t quark; + } + float amount; + double remainder; + + + + + baz(); + uint32_t llama; + uint32_t treehouse; +} +char * w; +uint8_t x; + + + + +int baz(void); +long y; +int z; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31665-var_def_blks.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31665-var_def_blks.cpp new file mode 100644 index 00000000..e328c1db --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31665-var_def_blks.cpp @@ -0,0 +1,46 @@ +unsigned a; +char b; +int bar(void); + + +unsigned c; +char d; +int foo(void) { + char buf[1000] = {0}; + size_t len; + float amount; + double remainder; + + bar(); + + + uint64_t quux; + uint64_t quack; + for (int i = 0; i < 1000; i++) { + uint64_t checksum; + double remainder; + buf[i] += len; + + + uint32_t xyzzy; + uint32_t quark; + } + + + float amount; + double remainder; + baz(); + + + uint32_t llama; + uint32_t treehouse; +} + + +char * w; +uint8_t x; +int baz(void); + + +long y; +int z; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31666-var_def_blks.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31666-var_def_blks.cpp new file mode 100644 index 00000000..87f45a37 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31666-var_def_blks.cpp @@ -0,0 +1,56 @@ +unsigned a; +char b; + + + + +int bar(void); +unsigned c; +char d; + + + + +int foo(void) { + char buf[1000] = {0}; + size_t len; + float amount; + double remainder; + + bar(); + uint64_t quux; + uint64_t quack; + + + + + for (int i = 0; i < 1000; i++) { + uint64_t checksum; + double remainder; + + + + + buf[i] += len; + uint32_t xyzzy; + uint32_t quark; + } + float amount; + double remainder; + + + + + baz(); + uint32_t llama; + uint32_t treehouse; +} +char * w; +uint8_t x; + + + + +int baz(void); +long y; +int z; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31667-var_def_blks.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31667-var_def_blks.cpp new file mode 100644 index 00000000..e1652f4a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31667-var_def_blks.cpp @@ -0,0 +1,69 @@ +unsigned a; +char b; + + + + +int bar(void); + + +unsigned c; +char d; + + + + +int foo(void) { + char buf[1000] = {0}; + size_t len; + float amount; + double remainder; + bar(); + + + uint64_t quux; + uint64_t quack; + + + + + for (int i = 0; i < 1000; i++) { + uint64_t checksum; + double remainder; + + + + + buf[i] += len; + + + uint32_t xyzzy; + uint32_t quark; + } + + + float amount; + double remainder; + + + + + baz(); + + + uint32_t llama; + uint32_t treehouse; +} + + +char * w; +uint8_t x; + + + + +int baz(void); + + +long y; +int z; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31668-var_def_blks.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31668-var_def_blks.cpp new file mode 100644 index 00000000..d660b2c2 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31668-var_def_blks.cpp @@ -0,0 +1,70 @@ +unsigned a; +char b; + + + + +int bar(void); + + +unsigned c; +char d; + + + + +int foo(void) { + char buf[1000] = {0}; + size_t len; + float amount; + double remainder; + + bar(); + + + uint64_t quux; + uint64_t quack; + + + + + for (int i = 0; i < 1000; i++) { + uint64_t checksum; + double remainder; + + + + + buf[i] += len; + + + uint32_t xyzzy; + uint32_t quark; + } + + + float amount; + double remainder; + + + + + baz(); + + + uint32_t llama; + uint32_t treehouse; +} + + +char * w; +uint8_t x; + + + + +int baz(void); + + +long y; +int z; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31700-toggle_processing_cmt.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31700-toggle_processing_cmt.cpp new file mode 100644 index 00000000..03615082 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31700-toggle_processing_cmt.cpp @@ -0,0 +1,63 @@ +void func() { +} + +// **ABC** +void func() { } +// *INDENT-ON* + +void func() { +} + +/** + * Function to solve for roots of a generic quartic polynomial of the following form: + * \verbatim + + p(x) = a * x^4 + b * x^3 + c * x^2 + d * x + e, + + where a, b, c, d, and e are real coefficients + + * \endverbatim + * + * This object's tolerance defines a threshold for root solutions above which iterative methods will be employed to achieve the desired accuracy + * + * \verbatim - this should cause the following line to not wrap due to cmt_width + * Upon success, the roots array contains the solution to the polynomial p(x) = 0 + * \endverbatim + * + Return value on output: + * - 0, if an error occurs (invalid coefficients) + * - 1, if all roots are real + * - 2, if two roots are real and two roots are complex conjugates + * - 3, if the roots are two pairs of complex conjugates + */ +int solve(double a, + double b, + double c, + double d, + double e, + std::complex<double> roots[4]); + +/** + * Function to solve for roots of a generic quartic polynomial of the following form: + * + + p(x) = a * x^4 + b * x^3 + c * x^2 + d * x + e, + where a, b, c, d, and e are real coefficients + * + * Upon success, root1, root2, root3, and root4 contain the solution to the polynomial p(x) = 0 + * + Return value on output: + * - 0, if an error occurs (invalid coefficients) + * - 1, if all roots are real + * - 2, if two roots are real and two roots are complex conjugates + * - 3, if the roots are two pairs of complex conjugates + */ +/* **ABC** */ + int solve(double a, + double b, + double c, + double d, + double e, + std::complex<double> &root1, + std::complex<double> &root2, + std::complex<double> &root3, + std::complex<double> &root4); +/* ??DEF?? */ diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31701-toggle_processing_cmt2.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31701-toggle_processing_cmt2.cpp new file mode 100644 index 00000000..f67cb76b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31701-toggle_processing_cmt2.cpp @@ -0,0 +1,9 @@ +void func() { +} + +// *INDENT-OFF* +void func() { } +// ??DEF?? + +void func() { +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31702-toggle_processing_cmt.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31702-toggle_processing_cmt.cpp new file mode 100644 index 00000000..adf1b8be --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31702-toggle_processing_cmt.cpp @@ -0,0 +1,68 @@ +void func() { +} + +// **ABC** +void func() { } +// *INDENT-ON* + +void func() { +} + +/** + * Function to solve for roots of a generic quartic polynomial of the + * following form: + * \verbatim + + p(x) = a * x^4 + b * x^3 + c * x^2 + d * x + e, + + where a, b, c, d, and e are real coefficients + + * \endverbatim + * + * This object's tolerance defines a threshold for root solutions + * above which iterative methods will be employed to achieve the + * desired accuracy + * + * \verbatim - this should cause the following line to not wrap due to cmt_width + * Upon success, the roots array contains the solution to the polynomial p(x) = 0 + * \endverbatim + * + Return value on output: + * - 0, if an error occurs (invalid coefficients) + * - 1, if all roots are real + * - 2, if two roots are real and two roots are complex conjugates + * - 3, if the roots are two pairs of complex conjugates + */ +int solve(double a, + double b, + double c, + double d, + double e, + std::complex<double> roots[4]); + +/** + * Function to solve for roots of a generic quartic polynomial of the + * following form: + * + * + * p(x) = a * x^4 + b * x^3 + c * x^2 + d * x + e, where a, b, c, d, + * and e are real coefficients + * + * Upon success, root1, root2, root3, and root4 contain the solution + * to the polynomial p(x) = 0 + * + Return value on output: + * - 0, if an error occurs (invalid coefficients) + * - 1, if all roots are real + * - 2, if two roots are real and two roots are complex conjugates + * - 3, if the roots are two pairs of complex conjugates + */ +/* **ABC** */ + int solve(double a, + double b, + double c, + double d, + double e, + std::complex<double> &root1, + std::complex<double> &root2, + std::complex<double> &root3, + std::complex<double> &root4); +/* ??DEF?? */ diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31703-toggle_processing_cmt.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31703-toggle_processing_cmt.cpp new file mode 100644 index 00000000..e806e89e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31703-toggle_processing_cmt.cpp @@ -0,0 +1,68 @@ +void func() { +} + +// **ABC** +void func() { } +// *INDENT-ON* + +void func() { +} + +/** + * Function to solve for roots of a generic quartic polynomial of the + * following form: + * \verbatim + + p(x) = a * x^4 + b * x^3 + c * x^2 + d * x + e, + + where a, b, c, d, and e are real coefficients + + * \endverbatim + * + * This object's tolerance defines a threshold for root solutions + * above which iterative methods will be employed to achieve the + * desired accuracy + * + * \verbatim - this should cause the following line to not wrap due to cmt_width + * Upon success, the roots array contains the solution to the polynomial p(x) = 0 + * \endverbatim + * + Return value on output: + * - 0, if an error occurs (invalid coefficients) + * - 1, if all roots are real + * - 2, if two roots are real and two roots are complex conjugates + * - 3, if the roots are two pairs of complex conjugates + */ +int solve(double a, + double b, + double c, + double d, + double e, + std::complex<double> roots[4]); + +/** + * Function to solve for roots of a generic quartic polynomial of the + * following form: + * + + p(x) = a * x^4 + b * x^3 + c * x^2 + d * x + e, + where a, b, c, d, and e are real coefficients + * + * Upon success, root1, root2, root3, and root4 contain the solution + * to the polynomial p(x) = 0 + * + Return value on output: + * - 0, if an error occurs (invalid coefficients) + * - 1, if all roots are real + * - 2, if two roots are real and two roots are complex conjugates + * - 3, if the roots are two pairs of complex conjugates + */ +/* **ABC** */ + int solve(double a, + double b, + double c, + double d, + double e, + std::complex<double> &root1, + std::complex<double> &root2, + std::complex<double> &root3, + std::complex<double> &root4); +/* ??DEF?? */ diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31710-string_replace_tab_chars.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31710-string_replace_tab_chars.cpp new file mode 100644 index 00000000..8350740b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31710-string_replace_tab_chars.cpp @@ -0,0 +1,3 @@ +void f() { + auto x = " test\t ... ???"; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31711-string_replace_tab_chars.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31711-string_replace_tab_chars.cpp new file mode 100644 index 00000000..56f16799 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31711-string_replace_tab_chars.cpp @@ -0,0 +1,3 @@ +void f() { + auto x = "\ttest\t \t \t \t\t... ???"; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31720-bit-colon.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31720-bit-colon.cpp new file mode 100644 index 00000000..b8e7c4db --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31720-bit-colon.cpp @@ -0,0 +1,21 @@ +class C +{ + public: + size_t f1 : 1; + size_t f1 : 1; + size_t f2 : sizeof(size_t) - 1; + + Q_SIGNALS: + void somesignal(); +}; + +struct S +{ + private: + size_t f1 : 1; + size_t f1 : 1; + size_t f2 : sizeof(size_t) - 1; + + Q_SIGNALS: + void somesignal(); +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31721-Issue_2689.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31721-Issue_2689.cpp new file mode 100644 index 00000000..e2b43674 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31721-Issue_2689.cpp @@ -0,0 +1,5 @@ +class C +{ + public: + size_t f4 : 8 * sizeof(size_t) - 2; // <-- this star is treated a pointer token +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31730-ms-style-ref.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31730-ms-style-ref.cpp new file mode 100644 index 00000000..826d4e90 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31730-ms-style-ref.cpp @@ -0,0 +1,9 @@ +Foo^ foo = dynamic_cast<Bar^>(bar); +Foo* foo = dynamic_cast<Bar*>(bar); +x = a ^ b; + +int main(Platform::Array<Platform::String^>^ /*args*/) +{ +} + +Platform::Array<unsigned char>^ a; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31740-I2102.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31740-I2102.cpp new file mode 100644 index 00000000..d8cf883a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/31740-I2102.cpp @@ -0,0 +1,2 @@ +unsigned __int32 b = 1ui32; +unsigned __int64 b = 1ui64; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32000-sp_skip_vbrace_tokens.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32000-sp_skip_vbrace_tokens.cpp new file mode 100644 index 00000000..99d403ef --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32000-sp_skip_vbrace_tokens.cpp @@ -0,0 +1,10 @@ +void foo()
+{
+ if (data) go = new ClassA();
+ else go = new ClassB();
+
+ if (evt.alt) modifiers += "Alt+";
+ if (evt.command) modifiers += "Cmd+";
+ if (evt.control) modifiers += "Ctrl+";
+ if (evt.shift) modifiers += "Shift+";
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32001-issue_547_for_each.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32001-issue_547_for_each.cpp new file mode 100644 index 00000000..cfbe7963 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32001-issue_547_for_each.cpp @@ -0,0 +1,4 @@ +void foo()
+{
+ for_each(it.begin(), it.end(), func);
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32002-proto-wrap.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32002-proto-wrap.cpp new file mode 100644 index 00000000..35e8bea3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32002-proto-wrap.cpp @@ -0,0 +1,4 @@ +WRAP_FUNCTION(Foo, Bar& (void)); +WRAP_FUNCTION(Foo, Bar* (void)); +WRAP_FUNCTION(Foo, (Bar& (void))); +WRAP_FUNCTION(Foo, (Bar* (void))); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32003-issue_633_typename.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32003-issue_633_typename.cpp new file mode 100644 index 00000000..33b947f1 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32003-issue_633_typename.cpp @@ -0,0 +1,25 @@ +template < typename TImage > +class MorphologicalContourInterpolator : + public ImageToImageFilter< TImage, TImage > +{ +template < typename T > +friend class MorphologicalContourInterpolatorParallelInvoker; +friend class ::MultiLabelMeshPipeline; + +public: +/** Standard class typedefs. */ +typedef MorphologicalContourInterpolator Self; + +protected: +MorphologicalContourInterpolator(); +~MorphologicalContourInterpolator() { +} +typename TImage::PixelType m_Label; +int m_Axis; +bool m_HeuristicAlignment; + +private: +MorphologicalContourInterpolator( const Self& ) ITK_DELETE_FUNCTION; +void +operator=( const Self& ) ITK_DELETE_FUNCTION; +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32004-issue_624_angle.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32004-issue_624_angle.cpp new file mode 100644 index 00000000..255db223 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32004-issue_624_angle.cpp @@ -0,0 +1,2 @@ +auto c = a < b >> 1;
+auto c = a < b;
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32005-issue_633_typename.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32005-issue_633_typename.cpp new file mode 100644 index 00000000..33b947f1 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32005-issue_633_typename.cpp @@ -0,0 +1,25 @@ +template < typename TImage > +class MorphologicalContourInterpolator : + public ImageToImageFilter< TImage, TImage > +{ +template < typename T > +friend class MorphologicalContourInterpolatorParallelInvoker; +friend class ::MultiLabelMeshPipeline; + +public: +/** Standard class typedefs. */ +typedef MorphologicalContourInterpolator Self; + +protected: +MorphologicalContourInterpolator(); +~MorphologicalContourInterpolator() { +} +typename TImage::PixelType m_Label; +int m_Axis; +bool m_HeuristicAlignment; + +private: +MorphologicalContourInterpolator( const Self& ) ITK_DELETE_FUNCTION; +void +operator=( const Self& ) ITK_DELETE_FUNCTION; +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32006-bug_i_687.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32006-bug_i_687.cpp new file mode 100644 index 00000000..387eaa06 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32006-bug_i_687.cpp @@ -0,0 +1,5 @@ +struct S { static if (false) void bar() { + }; } + +struct S { static if (false) { void bar() { + }; } } diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32007-Issue_3052.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32007-Issue_3052.cpp new file mode 100644 index 00000000..cb468be3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32007-Issue_3052.cpp @@ -0,0 +1,11 @@ +#define VTABLE_DECLARE \ + extern struct vtable_struct_name_macro vtable_base_macro; \ + struct vtable_struct_name_macro + +#define VTABLE_METHOD(retvalue, method, args ...) \ + retvalue(*method)(args) + +VTABLE_DECLARE { + VTABLE_METHOD(int, get, const char *name); + VTABLE_METHOD(int, set, const char *name, int value); +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32008-Issue_3034.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32008-Issue_3034.cpp new file mode 100644 index 00000000..1a110ee8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32008-Issue_3034.cpp @@ -0,0 +1,15 @@ +void main() +{ + while (*stringcur) + { +#ifdef NO8BIT + if (((*bufcur++ ^ *stringcur) & 0x7F) != 0) +#else /* NO8BIT */ + if (*bufcur++ != *stringcur) +#endif /* NO8BIT */ /* Issue #3034 */ + { + break; + } + } +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32009-Issue_3422.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32009-Issue_3422.cpp new file mode 100644 index 00000000..66e5ddad --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32009-Issue_3422.cpp @@ -0,0 +1,14 @@ +voind main() +{ + unsigned long uncompressed_size = 0; + char *data_buffer = NULL; + + unsigned long uncompressed_size = 0, compressed_size = 0; + char *data_buffer = NULL; + + unsigned long uncompressed_size, compressed_size = 0; + char *data_buffer = NULL; + + unsigned long uncompressed_size, compressed_size; + char *data_buffer = NULL; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32010-Issue_3422.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32010-Issue_3422.cpp new file mode 100644 index 00000000..7077eb71 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32010-Issue_3422.cpp @@ -0,0 +1,14 @@ +voind main() +{ + unsigned long uncompressed_size = 0; + char *data_buffer = NULL; + + unsigned long uncompressed_size = 0, compressed_size = 0; + char *data_buffer = NULL; + + unsigned long uncompressed_size, compressed_size = 0; + char *data_buffer = NULL; + + unsigned long uncompressed_size, compressed_size; + char *data_buffer = NULL; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32100-cpp17.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32100-cpp17.cpp new file mode 100644 index 00000000..cfccba03 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32100-cpp17.cpp @@ -0,0 +1,8 @@ +bool CompareGenomeByFeatureResults::clickOnLink(std::string const& inLink) { + auto const [sequence, type, firstPosition, lastPosition] = parseLink(inLink); + if (sequence.empty()) { + return true; + } + return showFeature(statistics.nameDocumentA, type, firstPosition, lastPosition); +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32105-I2103.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32105-I2103.cpp new file mode 100644 index 00000000..c35fbe56 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32105-I2103.cpp @@ -0,0 +1,3 @@ +int i1 = EEnumType::a & EEnumType::b; +int i2 = a & b; +int i3 = EEnumType::Enum1 & b; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32115-2185.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32115-2185.cpp new file mode 100644 index 00000000..6f874926 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/32115-2185.cpp @@ -0,0 +1,13 @@ +typedef enum { + HAL_USART_ENABLED = 64, ///< Requested task impossible while + ///< peripheral in question is + ///< enabled + HAL_USART_DISABLED, ///< Requested task impossible while + ///< peripheral in question is + ///< disabled + HAL_USART_GPIO_ERROR, ///< GPIO tied with USART peripheral + ///< returned error state + HAL_USART_BUFFER_DEPLETED, ///< Not enough data to be read + HAL_USART_BUFFER_FULL ///< Data requested to be written + ///< didn't fit into buffer +} hal_usart_errors_t; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33000-tab-0.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33000-tab-0.cpp new file mode 100644 index 00000000..d9ff0418 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33000-tab-0.cpp @@ -0,0 +1,9 @@ +/* test of + * indent_with_tabs = 0 + * indent_columns = 11 + * the source has many <TAB> + */ +{ + int a; + int b; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33001-tab-1.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33001-tab-1.cpp new file mode 100644 index 00000000..85d8abe2 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33001-tab-1.cpp @@ -0,0 +1,9 @@ +/* test of + * indent_with_tabs = 1 + * indent_columns = 11 + * the source has NO <TAB> + */ +{ + int x; + int y; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33002-cmt_convert_tab_to_spaces.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33002-cmt_convert_tab_to_spaces.cpp new file mode 100644 index 00000000..32ff32d3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33002-cmt_convert_tab_to_spaces.cpp @@ -0,0 +1,5 @@ +void f() { + /* Comment with <TAB> here + * and here again + */ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33003-cmt_convert_tab_to_spaces.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33003-cmt_convert_tab_to_spaces.cpp new file mode 100644 index 00000000..db09e6fc --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33003-cmt_convert_tab_to_spaces.cpp @@ -0,0 +1,5 @@ +void f() { + /* Comment with <TAB> here + * and here again + */ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33004-DoxygenComments.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33004-DoxygenComments.cpp new file mode 100644 index 00000000..df0b9680 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33004-DoxygenComments.cpp @@ -0,0 +1,2 @@ +// a cpp comment +///<a Doygen comment diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33005-DoxygenComments.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33005-DoxygenComments.cpp new file mode 100644 index 00000000..533214f2 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33005-DoxygenComments.cpp @@ -0,0 +1,2 @@ +// a cpp comment +///< a Doygen comment diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33006-string_replace_tab_chars.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33006-string_replace_tab_chars.cpp new file mode 100644 index 00000000..8350740b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33006-string_replace_tab_chars.cpp @@ -0,0 +1,3 @@ +void f() { + auto x = " test\t ... ???"; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33007-NewLine.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33007-NewLine.cpp new file mode 100644 index 00000000..9c7f1ee9 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33007-NewLine.cpp @@ -0,0 +1,9 @@ + + +{ + /* + * test for new lines, everywhere + */ +} + + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33008-NewLine.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33008-NewLine.cpp new file mode 100644 index 00000000..b3cc1bed --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33008-NewLine.cpp @@ -0,0 +1,5 @@ +{ + /* + * test for new lines, everywhere + */ +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33009-NewLine0.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33009-NewLine0.cpp new file mode 100644 index 00000000..b5a714fa --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33009-NewLine0.cpp @@ -0,0 +1,6 @@ + +{ + /* + * test for new lines, everywhere + */ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33010-Q_EMIT.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33010-Q_EMIT.cpp new file mode 100644 index 00000000..d3ef9396 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33010-Q_EMIT.cpp @@ -0,0 +1,5 @@ +bool Handler::failureResponse(const QByteArray &failureMessage) +{ + response.setString(failureMessage); + Q_EMIT responseAvailable(response); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33011-static.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33011-static.h new file mode 100644 index 00000000..8121fef1 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33011-static.h @@ -0,0 +1,25 @@ +#ifndef AKONADISERVER_H +#define AKONADISERVER_H + +#include <QtCore/QPointer> +#include <QtCore/QVector> + +#include <QtNetwork/QLocalServer> + +class QProcess; + +namespace Akonadi { +namespace Server { + +class AkonadiServer : public QLocalServer +{ + Q_OBJECT + +public: + ~AkonadiServer(); + static AkonadiServer *instance(); +}; + +} // namespace Server +} // namespace Akonadi +#endif diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33012-Q_SIGNAL_SLOT.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33012-Q_SIGNAL_SLOT.cpp new file mode 100644 index 00000000..faf00903 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33012-Q_SIGNAL_SLOT.cpp @@ -0,0 +1,23 @@ +bool AkonadiServer::init() +{ + connect(watcher, SIGNAL(serviceOwnerChanged(QString,QString,QString)), + this, SLOT(serviceOwnerChanged(QString,QString,QString))); + return true; +} + +connect(&mapper, SIGNAL(mapped(Q1&)), this, SLOT(onSomeEvent(const Q2&))); + +connect(&mapper, + SIGNAL(mapped(Q1&)), + this, + SLOT(onSomeEvent(const Q2&))); + +connect(&mapper, + SIGNAL(emitted(Q1*)), + this, + SLOT(accept(const Q2*))); + +connect(&mapper, + SIGNAL(emitted(X<int>)), + this, + SLOT(accept(X<int>))); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33013-Q_2.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33013-Q_2.cpp new file mode 100644 index 00000000..7d0bb88a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33013-Q_2.cpp @@ -0,0 +1,10 @@ +bool AkonadiServer::quit() +{ + QTimer::singleShot(0, this, SLOT(doQuit())); +} + +void AkonadiServer::incomingConnection(quintptr socketDescriptor) +{ + QPointer<ConnectionThread> thread = new ConnectionThread(socketDescriptor, this); + connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater())); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33014-DB.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33014-DB.cpp new file mode 100644 index 00000000..1b8f4bc8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33014-DB.cpp @@ -0,0 +1,5 @@ +void AkonadiServer::createDatabase() +{ + DbConfig::configuredDatabase()->apply(db); + db.setDatabaseName(DbConfig::configuredDatabase()->databaseName()); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33015-Q_FOREACH.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33015-Q_FOREACH.cpp new file mode 100644 index 00000000..02fd849d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33015-Q_FOREACH.cpp @@ -0,0 +1,6 @@ +void Cache::collection() +{ + Q_FOREACH (QString partName, lParts) { + a = 5; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33016-indent.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33016-indent.cpp new file mode 100644 index 00000000..22d04a78 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33016-indent.cpp @@ -0,0 +1,20 @@ +int a () +{ + double a_very_long_variable = test (foobar1, + foobar5); +//3456789=123456789=123456789=123456789= + + double a_other_very_long = asdfasdfasdfasdfasdf + asdfasfafasdfa + + asdfasdfasdf - asdfasdf + 56598; +//3456789=123456789=123456789=123456789= + + a_other_very_long = asdfasdfasdfasdfasdf + asdfasfafasdfa + + asdfasdfasdf - asdfasdf + 56598; +//3456789=123456789=123456789=123456789= + + testadsfa (dfasdf, + aaafsdfa); +//3456789=123456789=123456789=123456789= + + return 0; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33017-bug_1160.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33017-bug_1160.cpp new file mode 100644 index 00000000..8dc7a9d1 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33017-bug_1160.cpp @@ -0,0 +1,7 @@ +template<typename T1> +class Class1 +{ +public: + status.time_count = duration_cast<::milliseconds> + (steady_clock::now().time_since_epoch()).count(); +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33019-bug_657.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33019-bug_657.cpp new file mode 100644 index 00000000..3b5bb42a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33019-bug_657.cpp @@ -0,0 +1,2 @@ +class NewClass : public OldClass/*somecomment*/ + , public SomeClass; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33020-bug_662.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33020-bug_662.cpp new file mode 100644 index 00000000..48b612ae --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33020-bug_662.cpp @@ -0,0 +1,13 @@ +/// foo +///< foo +//! foo +//!< foo + +//@{ +//@} + +///@{ +///@} + +//!@{ +//!@} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33021-bug_633.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33021-bug_633.cpp new file mode 100644 index 00000000..5b672b47 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33021-bug_633.cpp @@ -0,0 +1,29 @@ +typedef void (*func)(); +typedef void (__stdcall *func)(); + +class CDataObject : public IDataObject +{ +public: + // IUnknown members + HRESULT __stdcall QueryInterface(REFIID iid, void ** ppvObject); + ULONG __stdcall AddRef(void); + ULONG __stdcall Release(void); + + // IDataObject members + HRESULT __stdcall GetData(FORMATETC *pFormatEtc, STGMEDIUM *pmedium); + HRESULT __stdcall GetDataHere(FORMATETC *pFormatEtc, STGMEDIUM *pmedium); + HRESULT __stdcall QueryGetData(FORMATETC *pFormatEtc); + HRESULT __stdcall GetCanonicalFormatEtc(FORMATETC *pFormatEct, FORMATETC *pFormatEtcOut); + HRESULT __stdcall SetData(FORMATETC *pFormatEtc, STGMEDIUM *pMedium, BOOL fRelease); + HRESULT __stdcall EnumFormatEtc(DWORD dwDirection, IEnumFORMATETC **ppEnumFormatEtc); + HRESULT __stdcall DAdvise(FORMATETC *pFormatEtc, DWORD advf, IAdviseSink *, DWORD *); + HRESULT __stdcall DUnadvise(DWORD dwConnection); + HRESULT __stdcall EnumDAdvise(IEnumSTATDATA **ppEnumAdvise); + + // exercise others + HRESULT __cdecl GetData(FORMATETC *pFormatEtc, STGMEDIUM *pmedium); + HRESULT __clrcall GetData(FORMATETC *pFormatEtc, STGMEDIUM *pmedium); + HRESULT __fastcall GetData(FORMATETC *pFormatEtc, STGMEDIUM *pmedium); + HRESULT __thiscall GetData(FORMATETC *pFormatEtc, STGMEDIUM *pmedium); + HRESULT __vectorcall GetData(FORMATETC *pFormatEtc, STGMEDIUM *pmedium); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33022-bug_634.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33022-bug_634.cpp new file mode 100644 index 00000000..febbf7b3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33022-bug_634.cpp @@ -0,0 +1,2 @@ +__attribute__((visibility ("default"))) NSString* i; +extern "C" NSString* i; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33023-bug_651.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33023-bug_651.cpp new file mode 100644 index 00000000..f0236016 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33023-bug_651.cpp @@ -0,0 +1,16 @@ +int a () +{ + double a_very_long_variable = test (foobar1, + foobar5); + + double a_other_very_long = asdfasdfasdfasdfasdf + asdfasfafasdfa + + asdfasdfasdf - asdfasdf + 56598; + + a_other_very_long = asdfasdfasdfasdfasdf + asdfasfafasdfa + + asdfasdfasdf - asdfasdf + 56598; + + testadsfa (dfasdf, + aaafsdfa); + + return 0; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33024-bug_653.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33024-bug_653.cpp new file mode 100644 index 00000000..1bf853d6 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33024-bug_653.cpp @@ -0,0 +1,4 @@ +/* + * + **Some comment + */ diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33025-bug_654.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33025-bug_654.cpp new file mode 100644 index 00000000..497e3372 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33025-bug_654.cpp @@ -0,0 +1,7 @@ +A( b, c, d); +connect(&mapper, SIGNAL(mapped(Q1&)), this, SLOT(onSomeEvent(const Q2&))); +connect(&mapper, + SIGNAL(mapped(Q1&)), + this, + SLOT(onSomeEvent(const Q2&))); +A( b, c, d); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33026-bug_631.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33026-bug_631.cpp new file mode 100644 index 00000000..e110d383 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33026-bug_631.cpp @@ -0,0 +1,4 @@ +static inline auto myFunc(MyType const& myValue) +->std::string + +static inline std::string myFunc(MyType const& myValue) diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33027-bug_664.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33027-bug_664.cpp new file mode 100644 index 00000000..6fa5beea --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33027-bug_664.cpp @@ -0,0 +1,5 @@ +bool dllInit = + [ ]() +//34567890 + { + }(); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33028-braces_empty.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33028-braces_empty.cpp new file mode 100644 index 00000000..8e46ab7c --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33028-braces_empty.cpp @@ -0,0 +1,9 @@ +class Parser::ParserPrivate {}; + +template <typename T> class to {}; + +my $all = {}; + +enum FocusEffect {}; + +struct error {}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33029-cast.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33029-cast.cpp new file mode 100644 index 00000000..67e725ff --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33029-cast.cpp @@ -0,0 +1,6 @@ +{ + a = ( int ) 5.6; + b = int( 5.6 ); + c = ( type<int> ) t; + d = ( type<int, int> ) t; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33030-Q_FOREVER.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33030-Q_FOREVER.cpp new file mode 100644 index 00000000..5dad4fa9 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33030-Q_FOREVER.cpp @@ -0,0 +1,6 @@ +void Cache::collection() +{ + Q_FOREVER { + a = 5; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33031-bug_612.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33031-bug_612.cpp new file mode 100644 index 00000000..4388ac75 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33031-bug_612.cpp @@ -0,0 +1,23 @@ +void foo(void) +{ + int a = 0, b = 0; + char chvar = 0, var = 0; + + a = 0; + b = 0; + chvar = 0; + var = 0; +} + +void bar(void) +{ + int a = 0; + int b = 0; + char chvar = 0; + char var = 0; + + a = 0; + b = 0; + chvar = 0; + var = 0; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33032-bug_670.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33032-bug_670.cpp new file mode 100644 index 00000000..0ede02f2 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33032-bug_670.cpp @@ -0,0 +1,8 @@ +// 3456789=123456789=123456789=123456789=123456789=123456789=12 +std::map<int, std::string> +FOO::foo( + int key, + std::string value ) +{ + return std::map<int, std::string>( key, value ); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33033-bug_670.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33033-bug_670.h new file mode 100644 index 00000000..cc6d46e3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33033-bug_670.h @@ -0,0 +1,5 @@ +// 3456789=123456789=123456789=123456789=123456789=123456789=12 +std::map<int, std::string> +FOO::foo( + int key, + std::string value ); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33034-bug_671.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33034-bug_671.h new file mode 100644 index 00000000..5ef3b5d9 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33034-bug_671.h @@ -0,0 +1,8 @@ +#define FOO_MAX 10 + +bool foo[ FOO_MAX ]; + +void +foo_bar( int a, + int* b, + bool foo[ FOO_MAX ] ); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33035-patch_32.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33035-patch_32.cpp new file mode 100644 index 00000000..8b414f00 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33035-patch_32.cpp @@ -0,0 +1 @@ +/*! test */ diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33036-bug_663.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33036-bug_663.cpp new file mode 100644 index 00000000..7583d548 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33036-bug_663.cpp @@ -0,0 +1,11 @@ +#define SOME_MACRO TemplateClass<T> +int i; +#if defined(_MSC_VER) + #if _MSC_VER < 1300 + #define __func__ "unknown function" + #else + #define __func__ __FUNCTION__ + #endif /* _MSC_VER < 1300 */ +#endif /* defined(_MSC_VER) */ + +#define bug_demo (1 > 2) ? (1 : 2) diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33037-func_class.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33037-func_class.cpp new file mode 100644 index 00000000..ea271c11 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33037-func_class.cpp @@ -0,0 +1,34 @@ +/** + * Reverse the bytes in 32-bit chunks. + */ +void MD5::reverse_u32(UINT8 *buf, int n_u32) +{ + UINT8 tmp; +} + + +MD5::MD5() +{ + m_buf[0] = 0x01020304; +} + +class AlignStack +{ +public: + bool m_skip_first; + + + AlignStack() + { + } + + + ~AlignStack() + { + } + + + void End() + { + } +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33038-func_class.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33038-func_class.h new file mode 100644 index 00000000..8b3ca218 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33038-func_class.h @@ -0,0 +1,11 @@ +void MD5::reverse_u32(UINT8 *buf, int n_u32); +MD5::MD5(); + +class AlignStack +{ +public: + bool m_skip_first; + AlignStack(); + ~AlignStack(); + void End(); +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33039-mod_remove_empty_return.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33039-mod_remove_empty_return.cpp new file mode 100644 index 00000000..707c1c38 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33039-mod_remove_empty_return.cpp @@ -0,0 +1,3 @@ +void a() +{ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33040-bug_i_411.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33040-bug_i_411.cpp new file mode 100644 index 00000000..5a3f09aa --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33040-bug_i_411.cpp @@ -0,0 +1,12 @@ +class settings final +{ +public: +settings(); +~settings( ); +settings(const settings&); +settings & operator=(const settings&); +void set_something(const std::string& p_settings_name); +void set_another_setting(const std::string& p_settings_name); + + +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33041-bug_i_411.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33041-bug_i_411.cpp new file mode 100644 index 00000000..4e89d68d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33041-bug_i_411.cpp @@ -0,0 +1,16 @@ +class settings final +{ +public: +settings(); +~settings( ); +settings(const settings&); +settings & operator=(const settings&); + + +void set_something(const std::string& p_settings_name); + + +void set_another_setting(const std::string& p_settings_name); + + +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33042-bug_i_411.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33042-bug_i_411.cpp new file mode 100644 index 00000000..574f12ba --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33042-bug_i_411.cpp @@ -0,0 +1,16 @@ +class settings final +{ +public: +settings(); + + +~settings( ); + + +settings(const settings&); + + +settings & operator=(const settings&); +void set_something(const std::string& p_settings_name); +void set_another_setting(const std::string& p_settings_name); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33043-bug_i_478.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33043-bug_i_478.cpp new file mode 100644 index 00000000..868220bb --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33043-bug_i_478.cpp @@ -0,0 +1,24 @@ +{ + QString fileName = QFileDialog::getOpenFileName(this, + tr("Choose Configuration File"), ui->leStrategyFile->Text(), + tr("Configuration Files (*.cfg);; All Files (*.*)"), 0); + + pSettings = new QSettings(QCoreApplication::applicationDirPath() + "/" + + QCoreApplication::applicationName() + ".ini", + QSettings::IniFormat); +} +int a () +{ + double a_very_long_variable = test (foobar1, + foobar5); + + double a_other_very_long = asdfasdfasdfasdfasdf + asdfasfafasdfa + + asdfasdfasdf - asdfasdf + 56598; + + a_other_very_long = asdfasdfasdfasdfasdf + asdfasfafasdfa + + asdfasdfasdf - asdfasdf + 56598; + + testadsfa (dfasdf, + aaafsdfa); + return 0; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33044-bug_i_481.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33044-bug_i_481.cpp new file mode 100644 index 00000000..e8470648 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33044-bug_i_481.cpp @@ -0,0 +1,3 @@ +{ + connect( timer , SIGNAL(timeout()) , this , SLOT(timeoutImage()) ); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33045-bug_i_width.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33045-bug_i_width.cpp new file mode 100644 index 00000000..08f7888e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33045-bug_i_width.cpp @@ -0,0 +1,4 @@ +{ + // test if no split is possible + aaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccddddddddddddd; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33046-bug_i_409.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33046-bug_i_409.cpp new file mode 100644 index 00000000..6946a562 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33046-bug_i_409.cpp @@ -0,0 +1,14 @@ +if(X == Y) + X = Z; +if(Y == Z) + Y = X; + +for (i=0; i<5; i++) + foo(i); +for (i=0; i<5; i++) + foo(i); + +while (i<5) + foo(i++); +while (i<5) + foo(i++); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33047-bug_i_409.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33047-bug_i_409.cpp new file mode 100644 index 00000000..7bfdfd83 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33047-bug_i_409.cpp @@ -0,0 +1,8 @@ +if(X == Y) X = Z; +if(Y == Z) Y = X; + +for (i=0; i<5; i++) foo(i); +for (i=0; i<5; i++) foo(i); + +while (i<5) foo(i++); +while (i<5) foo(i++); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33048-bug_i_405.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33048-bug_i_405.cpp new file mode 100644 index 00000000..eda9b0dd --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33048-bug_i_405.cpp @@ -0,0 +1,12 @@ +namespace shark { + template<class Closure> + struct indexed_iterator { + typedef typename boost::mpl::if_< + boost::is_const< + Closure + >, + typename Closure::const_reference, + typename Closure::reference + >::type reference; + }; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33049-pp-pragma.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33049-pp-pragma.cpp new file mode 100644 index 00000000..2c013b08 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33049-pp-pragma.cpp @@ -0,0 +1,21 @@ +#include <stdio.h> +int main(int argc, char** argv) +{ + #ifdef DEBUG + #define FORMAT "argc=%d\n" + std::printf(FORMAT,argc); + #undef FORMAT + #endif DEBUG + #ifdef _OPENMP + #pragma omp parallel + { + printf("Hello from thread!\n"); + } + #endif + + #pragma CoverageScanner(cov-off) + __pragma( CoverageScanner(cov-off) ) + _Pragma( CoverageScanner(cov-off) ) + + return 0; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33050-issue_523.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33050-issue_523.cpp new file mode 100644 index 00000000..d203e398 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33050-issue_523.cpp @@ -0,0 +1,4 @@ + +#define MACRO(templ_type) template <typename T> class Abc<templ_type<T> > { } + +template<typename T> class Foo<Bar<T> > { }; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33051-bug_i_503.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33051-bug_i_503.cpp new file mode 100644 index 00000000..31ca41a8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33051-bug_i_503.cpp @@ -0,0 +1,8 @@ +0B8h +__asm +{ + mov al, 0B8h + mov al, 2 + mov dx, 0xD007 + out dx, al +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33052-bug_i_512.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33052-bug_i_512.cpp new file mode 100644 index 00000000..9b93cdf2 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33052-bug_i_512.cpp @@ -0,0 +1,4 @@ +template<typename TType> +class TTypeSpecialization1<TType> +{ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33053-for_auto.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33053-for_auto.cpp new file mode 100644 index 00000000..073556c9 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33053-for_auto.cpp @@ -0,0 +1,16 @@ +void foo() +{ + for (auto const& item : list) + bar(item); + for (const auto& item : list) + bar(item); + for (auto& item : list) + bar(item); + + auto* var = bar(); + auto& var = bar(); + auto var = bar(); + auto const* var = bar(); + auto const& var = bar(); + auto const var = bar(); +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33054-bug_i_825.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33054-bug_i_825.cpp new file mode 100644 index 00000000..242c4811 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33054-bug_i_825.cpp @@ -0,0 +1,5 @@ +void a() +{ + int i = 0; + int h = 0h; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33056-bug_33056.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33056-bug_33056.cpp new file mode 100644 index 00000000..1339ede1 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33056-bug_33056.cpp @@ -0,0 +1,7 @@ +inline T* * someFunc(foo** p, bar&& q) +{ +} + +inline T && someFunc(foo * *p, bar && q) +{ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33057-bug_1349.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33057-bug_1349.cpp new file mode 100644 index 00000000..fcc2e567 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33057-bug_1349.cpp @@ -0,0 +1,122 @@ +uint8_t a[][8]= +{ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}; +uint8_t b[][8]= +{ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}; +uint8_t c[][8]= +{ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}; +uint8_t d[][8]= +{ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}; +uint8_t e[][8]= +{ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}; +uint8_t f[][8]= +{ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33058-Issue_3164.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33058-Issue_3164.cpp new file mode 100644 index 00000000..a1e426b0 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33058-Issue_3164.cpp @@ -0,0 +1,3 @@ +#include <cassert> +#include <rt> +#include <cass> diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33059-mod_remove_empty_return-2.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33059-mod_remove_empty_return-2.cpp new file mode 100644 index 00000000..eb949c45 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33059-mod_remove_empty_return-2.cpp @@ -0,0 +1,10 @@ +namespace ComponentSpec { +void build(Context c) +{ + if (index == NSNotFound) { + return; + } + + invokeUpdateInvitees(c, invitees); +} +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33060-if_constexpr.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33060-if_constexpr.cpp new file mode 100644 index 00000000..032f74ec --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33060-if_constexpr.cpp @@ -0,0 +1,8 @@ +static constexpr int test{ + if constexpr (condition_1) + return 1; + else if constexpr (condition_2) + return 2; + else + return 3; +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33061-if_chain_braces.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33061-if_chain_braces.cpp new file mode 100644 index 00000000..693efc63 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33061-if_chain_braces.cpp @@ -0,0 +1,47 @@ + +int foo() { + if ( a ) + return 1; + else if ( b ) + return 2; + + if ( a ) + return 3; + else if ( b ) + return 4; + else { + a = 5; + return 5; + } + + if ( a ) + return 6; + else + return 7; + + if ( a ) + return 8; + + if ( b ) { + return 9; + } + + if ( b ) { + { b = 5; } + return 10; + } + + if ( a ) + return 11; + else { + return 12; + } + + if ( a ) { + return 13; + } else if ( b ) { + return 14; + } else { + return 15; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33062-if_chain_braces.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33062-if_chain_braces.cpp new file mode 100644 index 00000000..af36ed0e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33062-if_chain_braces.cpp @@ -0,0 +1,46 @@ + +int foo() { + if ( a ) + return 1; + else if ( b ) + return 2; + + if ( a ) { + return 3; + } + else if ( b ) { + return 4; + } + else { + a = 5; + return 5; + } + + if ( a ) + return 6; + else + return 7; + + if ( a ) + return 8; + + if ( b ) + return 9; + + if ( b ) { + { b = 5; } + return 10; + } + + if ( a ) + return 11; + else + return 12; + + if ( a ) + return 13; + else if ( b ) + return 14; + else + return 15; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33063-if_chain_braces.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33063-if_chain_braces.cpp new file mode 100644 index 00000000..00038700 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33063-if_chain_braces.cpp @@ -0,0 +1,54 @@ + +int foo() { + if ( a ) { + return 1; + } + else if ( b ) { + return 2; + } + + if ( a ) { + return 3; + } + else if ( b ) { + return 4; + } + else { + a = 5; + return 5; + } + + if ( a ) { + return 6; + } + else{ + return 7; + } + + if ( a ) + return 8; + + if ( b ) { + return 9; + } + + if ( b ) { + { b = 5; } + return 10; + } + + if ( a ) { + return 11; + } + else { + return 12; + } + + if ( a ) { + return 13; + } else if ( b ) { + return 14; + } else { + return 15; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33064-if_chain_braces.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33064-if_chain_braces.cpp new file mode 100644 index 00000000..c42ef73a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33064-if_chain_braces.cpp @@ -0,0 +1,53 @@ + +int foo() { + if ( a ) { + return 1; + } + else if ( b ) { + return 2; + } + + if ( a ) { + return 3; + } + else if ( b ) { + return 4; + } + else { + a = 5; + return 5; + } + + if ( a ) { + return 6; + } + else{ + return 7; + } + + if ( a ) + return 8; + + if ( b ) + return 9; + + if ( b ) { + { b = 5; } + return 10; + } + + if ( a ) { + return 11; + } + else { + return 12; + } + + if ( a ) { + return 13; + } else if ( b ) { + return 14; + } else { + return 15; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33065-Issue_3316.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33065-Issue_3316.cpp new file mode 100644 index 00000000..91ec82f0 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33065-Issue_3316.cpp @@ -0,0 +1,15 @@ +#include <iostream> + +bool +foo() +{ + const int i = 3; + + if ( (i == 2) || (i == 3) || (i == 5) ) { + std::cerr << "Very small prime!\n"; + } + + const auto isSmallPrime = (i == 2) || (i == 3) || (i == 5) || (i == 7) || (i == 11); + + return isSmallPrime || (i == 13) || (i == 17) || (i == 19); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33066-if_chain_braces.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33066-if_chain_braces.cpp new file mode 100644 index 00000000..0ef6478b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33066-if_chain_braces.cpp @@ -0,0 +1,50 @@ + +int foo() { + if ( a ) + return 1; + else if ( b ) + return 2; + + if ( a ) { + return 3; + } + else if ( b ) { + return 4; + } + else { + a = 5; + return 5; + } + + if ( a ) + return 6; + else + return 7; + + if ( a ) + return 8; + + if ( b ) { + return 9; + } + + if ( b ) { + { b = 5; } + return 10; + } + + if ( a ) { + return 11; + } + else { + return 12; + } + + if ( a ) { + return 13; + } else if ( b ) { + return 14; + } else { + return 15; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33067-if_chain_braces.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33067-if_chain_braces.cpp new file mode 100644 index 00000000..7df1c6e8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33067-if_chain_braces.cpp @@ -0,0 +1,48 @@ + +int foo() { + if ( a ) + return 1; + else if ( b ) + return 2; + + if ( a ) { + return 3; + } + else if ( b ) { + return 4; + } + else { + a = 5; + return 5; + } + + if ( a ) + return 6; + else + return 7; + + if ( a ) + return 8; + + if ( b ) { + return 9; + } + + if ( b ) { + { b = 5; } + return 10; + } + + if ( a ) + return 11; + else + return 12; + + if ( a ) { + return 13; + } else if ( b ) { + return 14; + } else { + return 15; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33069-Issue_2195.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33069-Issue_2195.cpp new file mode 100644 index 00000000..fe3ec459 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33069-Issue_2195.cpp @@ -0,0 +1,39 @@ +void Launcher::signal(int code) +{ + /* + 1 HUP 2 INT 3 QUIT 4 ILL 5 TRAP 6 ABRT 7 BUS + 8 FPE 9 KILL 10 USR1 11 SEGV 12 USR2 13 PIPE 14 ALRM + 15 TERM 16 STKFLT 17 CHLD 18 CONT 19 STOP 20 TSTP 21 TTIN + 22 TTOU 23 URG 24 XCPU 25 XFSZ 26 VTALRM 27 PROF 28 WINCH + 29 POLL 30 PWR 31 SYS + + + Operation WinCode NixCode + Status 128 1 (HUP) + Terminate N/A 2 (INT) Linux or macOS uses this for CTRL-C. + 129 3 + 130 4 + 131 5 + 132 6 + 133 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + Terminate N/A 15 (TERM) Linux or macOS uses this for CTRL-C. + 16 + N/A 17 (CHILD) Child process exited. + N/A 28 WINCH, window changed size. + */ + + // Convert to lower range + if (code >= 128) + { + code -= 127; + } + + event_queue.push(code); +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33070-multi_line.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33070-multi_line.cpp new file mode 100644 index 00000000..dcea4c00 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33070-multi_line.cpp @@ -0,0 +1,46 @@ + +void func_a ( int a, string b, char c ); + +void func_b ( int a, + string b, char c ); + +void func_c ( int a, string b, char c + ); + +void func_d ( int aaaaaaaaaaaaaa, string bbbbbbbbbbbbbb, + char cccccccccccccccccc ); + +void func_a ( int a, string b, char c ) +{ + return; +} + +void func_b ( int a, + string b, char c ) +{ + return; +} + +void func_c ( int a, string b, char c + ) +{ + return; +} + +void func_d ( int aaaaaaaaaaaaaa, string bbbbbbbbbbbbbb, + char cccccccccccccccccc ) +{ + return; +} + +void func_call() +{ + func_a ( 1, 2, 3); + func_b ( 4, + 5, 6 ); + func_c ( 7, 8, 9 + ); + + func_d ( "aaaaaaaaaaaaaaaaaa", "bbbbbbbbbbbbbbbbbb", + "cccccccccccccccccccccc" ); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33071-multi_line.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33071-multi_line.cpp new file mode 100644 index 00000000..0f8503fc --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33071-multi_line.cpp @@ -0,0 +1,49 @@ + +void func_a ( int a, string b, char c ); + +void func_b ( + int a, + string b, char c ); + +void func_c ( + int a, string b, char c + ); + +void func_d ( + int aaaaaaaaaaaaaa, string bbbbbbbbbbbbbb, + char cccccccccccccccccc ); + +void func_a ( int a, string b, char c ) +{ + return; +} + +void func_b ( int a, + string b, char c ) +{ + return; +} + +void func_c ( int a, string b, char c + ) +{ + return; +} + +void func_d ( int aaaaaaaaaaaaaa, string bbbbbbbbbbbbbb, + char cccccccccccccccccc ) +{ + return; +} + +void func_call() +{ + func_a ( 1, 2, 3); + func_b ( 4, + 5, 6 ); + func_c ( 7, 8, 9 + ); + + func_d ( "aaaaaaaaaaaaaaaaaa", "bbbbbbbbbbbbbbbbbb", + "cccccccccccccccccccccc" ); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33072-multi_line.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33072-multi_line.cpp new file mode 100644 index 00000000..add93503 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33072-multi_line.cpp @@ -0,0 +1,49 @@ + +void func_a ( int a, string b, char c ); + +void func_b ( int a, + string b, char c ); + +void func_c ( int a, string b, char c + ); + +void func_d ( int aaaaaaaaaaaaaa, string bbbbbbbbbbbbbb, + char cccccccccccccccccc ); + +void func_a ( int a, string b, char c ) +{ + return; +} + +void func_b ( + int a, + string b, char c ) +{ + return; +} + +void func_c ( + int a, string b, char c + ) +{ + return; +} + +void func_d ( + int aaaaaaaaaaaaaa, string bbbbbbbbbbbbbb, + char cccccccccccccccccc ) +{ + return; +} + +void func_call() +{ + func_a ( 1, 2, 3); + func_b ( 4, + 5, 6 ); + func_c ( 7, 8, 9 + ); + + func_d ( "aaaaaaaaaaaaaaaaaa", "bbbbbbbbbbbbbbbbbb", + "cccccccccccccccccccccc" ); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33073-multi_line.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33073-multi_line.cpp new file mode 100644 index 00000000..c0016ff6 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33073-multi_line.cpp @@ -0,0 +1,48 @@ + +void func_a ( int a, string b, char c ); + +void func_b ( int a, + string b, char c + ); + +void func_c ( int a, string b, char c + ); + +void func_d ( int aaaaaaaaaaaaaa, string bbbbbbbbbbbbbb, + char cccccccccccccccccc + ); + +void func_a ( int a, string b, char c ) +{ + return; +} + +void func_b ( int a, + string b, char c ) +{ + return; +} + +void func_c ( int a, string b, char c + ) +{ + return; +} + +void func_d ( int aaaaaaaaaaaaaa, string bbbbbbbbbbbbbb, + char cccccccccccccccccc ) +{ + return; +} + +void func_call() +{ + func_a ( 1, 2, 3); + func_b ( 4, + 5, 6 ); + func_c ( 7, 8, 9 + ); + + func_d ( "aaaaaaaaaaaaaaaaaa", "bbbbbbbbbbbbbbbbbb", + "cccccccccccccccccccccc" ); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33074-multi_line.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33074-multi_line.cpp new file mode 100644 index 00000000..c8f32960 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33074-multi_line.cpp @@ -0,0 +1,48 @@ + +void func_a ( int a, string b, char c ); + +void func_b ( int a, + string b, char c ); + +void func_c ( int a, string b, char c + ); + +void func_d ( int aaaaaaaaaaaaaa, string bbbbbbbbbbbbbb, + char cccccccccccccccccc ); + +void func_a ( int a, string b, char c ) +{ + return; +} + +void func_b ( int a, + string b, char c + ) +{ + return; +} + +void func_c ( int a, string b, char c + ) +{ + return; +} + +void func_d ( int aaaaaaaaaaaaaa, string bbbbbbbbbbbbbb, + char cccccccccccccccccc + ) +{ + return; +} + +void func_call() +{ + func_a ( 1, 2, 3); + func_b ( 4, + 5, 6 ); + func_c ( 7, 8, 9 + ); + + func_d ( "aaaaaaaaaaaaaaaaaa", "bbbbbbbbbbbbbbbbbb", + "cccccccccccccccccccccc" ); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33075-multi_line.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33075-multi_line.cpp new file mode 100644 index 00000000..66963f4e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33075-multi_line.cpp @@ -0,0 +1,50 @@ + +void func_a ( int a, string b, char c ); + +void func_b ( int a, + string b, + char c ); + +void func_c ( int a, + string b, + char c + ); + +void func_d ( int aaaaaaaaaaaaaa, + string bbbbbbbbbbbbbb, + char cccccccccccccccccc ); + +void func_a ( int a, string b, char c ) +{ + return; +} + +void func_b ( int a, + string b, char c ) +{ + return; +} + +void func_c ( int a, string b, char c + ) +{ + return; +} + +void func_d ( int aaaaaaaaaaaaaa, string bbbbbbbbbbbbbb, + char cccccccccccccccccc ) +{ + return; +} + +void func_call() +{ + func_a ( 1, 2, 3); + func_b ( 4, + 5, 6 ); + func_c ( 7, 8, 9 + ); + + func_d ( "aaaaaaaaaaaaaaaaaa", "bbbbbbbbbbbbbbbbbb", + "cccccccccccccccccccccc" ); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33076-multi_line.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33076-multi_line.cpp new file mode 100644 index 00000000..9d105267 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33076-multi_line.cpp @@ -0,0 +1,50 @@ + +void func_a ( int a, string b, char c ); + +void func_b ( int a, + string b, char c ); + +void func_c ( int a, string b, char c + ); + +void func_d ( int aaaaaaaaaaaaaa, string bbbbbbbbbbbbbb, + char cccccccccccccccccc ); + +void func_a ( int a, string b, char c ) +{ + return; +} + +void func_b ( int a, + string b, + char c ) +{ + return; +} + +void func_c ( int a, + string b, + char c + ) +{ + return; +} + +void func_d ( int aaaaaaaaaaaaaa, + string bbbbbbbbbbbbbb, + char cccccccccccccccccc ) +{ + return; +} + +void func_call() +{ + func_a ( 1, 2, 3); + func_b ( 4, + 5, 6 ); + func_c ( 7, 8, 9 + ); + + func_d ( "aaaaaaaaaaaaaaaaaa", "bbbbbbbbbbbbbbbbbb", + "cccccccccccccccccccccc" ); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33077-multi_line.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33077-multi_line.cpp new file mode 100644 index 00000000..d7cbafc8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33077-multi_line.cpp @@ -0,0 +1,64 @@ + +void func_a ( int a, string b, char c ); + +void func_b ( + int a, + string b, + char c + ); + +void func_c ( + int a, + string b, + char c + ); + +void func_d ( + int aaaaaaaaaaaaaa, + string bbbbbbbbbbbbbb, + char cccccccccccccccccc + ); + +void func_a ( int a, string b, char c ) +{ + return; +} + +void func_b ( + int a, + string b, + char c + ) +{ + return; +} + +void func_c ( + int a, + string b, + char c + ) +{ + return; +} + +void func_d ( + int aaaaaaaaaaaaaa, + string bbbbbbbbbbbbbb, + char cccccccccccccccccc + ) +{ + return; +} + +void func_call() +{ + func_a ( 1, 2, 3); + func_b ( 4, + 5, 6 ); + func_c ( 7, 8, 9 + ); + + func_d ( "aaaaaaaaaaaaaaaaaa", "bbbbbbbbbbbbbbbbbb", + "cccccccccccccccccccccc" ); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33078-multi_line.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33078-multi_line.cpp new file mode 100644 index 00000000..01fe4d10 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33078-multi_line.cpp @@ -0,0 +1,49 @@ + +void func_a ( int a, string b, char c ); + +void func_b ( int a, + string b, char c ); + +void func_c ( int a, string b, char c + ); + +void func_d ( int aaaaaaaaaaaaaa, string bbbbbbbbbbbbbb, + char cccccccccccccccccc ); + +void func_a ( int a, string b, char c ) +{ + return; +} + +void func_b ( int a, + string b, char c ) +{ + return; +} + +void func_c ( int a, string b, char c + ) +{ + return; +} + +void func_d ( int aaaaaaaaaaaaaa, string bbbbbbbbbbbbbb, + char cccccccccccccccccc ) +{ + return; +} + +void func_call() +{ + func_a ( 1, 2, 3); + func_b ( + 4, + 5, 6 ); + func_c ( + 7, 8, 9 + ); + + func_d ( + "aaaaaaaaaaaaaaaaaa", "bbbbbbbbbbbbbbbbbb", + "cccccccccccccccccccccc" ); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33079-multi_line.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33079-multi_line.cpp new file mode 100644 index 00000000..6a6490ab --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33079-multi_line.cpp @@ -0,0 +1,50 @@ + +void func_a ( int a, string b, char c ); + +void func_b ( int a, + string b, char c ); + +void func_c ( int a, string b, char c + ); + +void func_d ( int aaaaaaaaaaaaaa, string bbbbbbbbbbbbbb, + char cccccccccccccccccc ); + +void func_a ( int a, string b, char c ) +{ + return; +} + +void func_b ( int a, + string b, char c ) +{ + return; +} + +void func_c ( int a, string b, char c + ) +{ + return; +} + +void func_d ( int aaaaaaaaaaaaaa, string bbbbbbbbbbbbbb, + char cccccccccccccccccc ) +{ + return; +} + +void func_call() +{ + func_a ( 1, 2, 3); + func_b ( 4, + 5, + 6 ); + func_c ( 7, + 8, + 9 + ); + + func_d ( "aaaaaaaaaaaaaaaaaa", + "bbbbbbbbbbbbbbbbbb", + "cccccccccccccccccccccc" ); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33080-multi_line.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33080-multi_line.cpp new file mode 100644 index 00000000..8f44ce91 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33080-multi_line.cpp @@ -0,0 +1,48 @@ + +void func_a ( int a, string b, char c ); + +void func_b ( int a, + string b, char c ); + +void func_c ( int a, string b, char c + ); + +void func_d ( int aaaaaaaaaaaaaa, string bbbbbbbbbbbbbb, + char cccccccccccccccccc ); + +void func_a ( int a, string b, char c ) +{ + return; +} + +void func_b ( int a, + string b, char c ) +{ + return; +} + +void func_c ( int a, string b, char c + ) +{ + return; +} + +void func_d ( int aaaaaaaaaaaaaa, string bbbbbbbbbbbbbb, + char cccccccccccccccccc ) +{ + return; +} + +void func_call() +{ + func_a ( 1, 2, 3); + func_b ( 4, + 5, 6 + ); + func_c ( 7, 8, 9 + ); + + func_d ( "aaaaaaaaaaaaaaaaaa", "bbbbbbbbbbbbbbbbbb", + "cccccccccccccccccccccc" + ); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33081-bug_i_552.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33081-bug_i_552.cpp new file mode 100644 index 00000000..5a0704de --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33081-bug_i_552.cpp @@ -0,0 +1,13 @@ +char *array_assign[2][4]= +{ + { + // foo + {"foo"}, + {"foo@1"},{"foo@2"},{"foo@3"} + }, + { + // bar + {"bar"}, + {"bar@1"},{"bar@2"},{"bar@3"} + } +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33082-namespace_namespace.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33082-namespace_namespace.cpp new file mode 100644 index 00000000..cf6f921e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33082-namespace_namespace.cpp @@ -0,0 +1,6 @@ +namespace hw { namespace stm32 { + +class RTC { +}; + +}} // namespace hw::stm32 diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33083-bug_i_359.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33083-bug_i_359.cpp new file mode 100644 index 00000000..8081c1f9 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33083-bug_i_359.cpp @@ -0,0 +1,14 @@ +int main() +{ + int foo = 42; + switch (foo) { + case 1: + std::cout << "1" << std::endl; + break; + case 2: + std::cout << "2" << std::endl; + break; + default: + std::cout << "Neither 1 nor 2." << std::endl; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33084-op_sym_empty.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33084-op_sym_empty.cpp new file mode 100644 index 00000000..3557e513 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33084-op_sym_empty.cpp @@ -0,0 +1,5 @@ +class Foo +{ +bool operator== ( const Foo & other ) const; +Bar & operator*() const; +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33085-bug_i_323.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33085-bug_i_323.cpp new file mode 100644 index 00000000..6f622f6e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33085-bug_i_323.cpp @@ -0,0 +1,4 @@ +class ATL_NO_VTABLE CProxy : + public ATL::CComCoClass<CProxy, &CLSID_Proxy> +{ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33086-bug_i_568.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33086-bug_i_568.cpp new file mode 100644 index 00000000..55da09f3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33086-bug_i_568.cpp @@ -0,0 +1,23 @@ +enum { // Keep this line as it is. It's a regression test for checking pc->GetPrev()->GetPrev()-> on CT_BRACE_OPEN. + kEnumValue =5, +}; + +struct foo +{ + int bar : kEnumValue; + int pad : 3; +}; + +class cls +{ + int bar : kEnumValue; + int pad : 3; + + void func() + { + goto end; + bar = 1; +end: + pad = 2; + } +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33087-bug_i_596.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33087-bug_i_596.cpp new file mode 100644 index 00000000..db3644a2 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33087-bug_i_596.cpp @@ -0,0 +1,10 @@ +#include "child.h" +int main(int argc, char*argv[]) { + (void)argc; + (void)argv; + Child child; + for (auto &attribute : *child.GetAttributes()) { + std::cout << attribute << std::endl; + } + return 0; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33088-bug_i_197.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33088-bug_i_197.cpp new file mode 100644 index 00000000..e86698fd --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33088-bug_i_197.cpp @@ -0,0 +1 @@ +struct A {int a;}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33089-bug_643.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33089-bug_643.cpp new file mode 100644 index 00000000..55e3e309 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33089-bug_643.cpp @@ -0,0 +1,6 @@ +class test_Dummy + : public QObject +{ + Q_OBJECT + test_Dummy* settings = nullptr; +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33090-gh555.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33090-gh555.cpp new file mode 100644 index 00000000..32147190 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33090-gh555.cpp @@ -0,0 +1,8 @@ +class \u005FClass // underscore character +{ +}; + +int main() +{ + string IdentifierContainingTwoUCNCharacters\u1234\U00001234 = "\u005FClass"; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33091-squeeze_ifdef.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33091-squeeze_ifdef.cpp new file mode 100644 index 00000000..7311c71e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33091-squeeze_ifdef.cpp @@ -0,0 +1,50 @@ + +#if defined(A) + +// Comment +extern int ax; +void fa(); + +#elif defined(B) + +extern int bx; +void fb(); + +#else + +extern int cx; +void fc(); + +#endif + +int foo() +{ +#if defined(A) + + int a = ax; + +#elif defined(B) + + // Comment + int b = bx; + +#else + + int c = cx; + +#endif +#if defined(A) + + return a; + +#elif defined(B) + + return b; + +#else + + // Comment + return c; + +#endif +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33092-squeeze_ifdef.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33092-squeeze_ifdef.cpp new file mode 100644 index 00000000..94b20d2e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33092-squeeze_ifdef.cpp @@ -0,0 +1,38 @@ + +#if defined(A) + +// Comment +extern int ax; +void fa(); + +#elif defined(B) + +extern int bx; +void fb(); + +#else + +extern int cx; +void fc(); + +#endif + +int foo() +{ +#if defined(A) + int a = ax; +#elif defined(B) + // Comment + int b = bx; +#else + int c = cx; +#endif +#if defined(A) + return a; +#elif defined(B) + return b; +#else + // Comment + return c; +#endif +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33093-sp_angle_paren.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33093-sp_angle_paren.cpp new file mode 100644 index 00000000..7ed4f34e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33093-sp_angle_paren.cpp @@ -0,0 +1,5 @@ +void foo() +{ + bar<T> (); + bar<T> (a); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33094-sp_angle_paren.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33094-sp_angle_paren.cpp new file mode 100644 index 00000000..c20305c3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33094-sp_angle_paren.cpp @@ -0,0 +1,5 @@ +void foo() +{ + bar<T>(); + bar<T> (a); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33095-bug_i_322.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33095-bug_i_322.cpp new file mode 100644 index 00000000..3904ec27 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33095-bug_i_322.cpp @@ -0,0 +1,4 @@ +class STDMETHOD +{ + STDMETHOD(GetValues)(BSTR bsName, REFDATA** pData); +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33096-squeeze_ifdef.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33096-squeeze_ifdef.cpp new file mode 100644 index 00000000..df3d90ab --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33096-squeeze_ifdef.cpp @@ -0,0 +1,32 @@ + +#if defined(A) +// Comment +extern int ax; +void fa(); +#elif defined(B) +extern int bx; +void fb(); +#else +extern int cx; +void fc(); +#endif + +int foo() +{ +#if defined(A) + int a = ax; +#elif defined(B) + // Comment + int b = bx; +#else + int c = cx; +#endif +#if defined(A) + return a; +#elif defined(B) + return b; +#else + // Comment + return c; +#endif +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33097-enum_comma.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33097-enum_comma.h new file mode 100644 index 00000000..bb93f4a9 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33097-enum_comma.h @@ -0,0 +1,10 @@ + +void function(int a, int b, int c); + +enum Test { + A, + B, + C, + D, + E +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33098-enum_comma.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33098-enum_comma.h new file mode 100644 index 00000000..3ec29719 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33098-enum_comma.h @@ -0,0 +1,10 @@ + +void function(int a + , int b + , int c); + +enum Test { + A, B, + C, + D, E +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33099-enum_comma.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33099-enum_comma.h new file mode 100644 index 00000000..01a89059 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33099-enum_comma.h @@ -0,0 +1,12 @@ + +void function(int a + , int b + , int c); + +enum Test { + A, + B, + C, + D, + E +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33100-enum_comma.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33100-enum_comma.h new file mode 100644 index 00000000..903a6849 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33100-enum_comma.h @@ -0,0 +1,10 @@ + +void function(int a, + int b, + int c); + +enum Test { + A, B + , C + ,D, E +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33101-enum_comma.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33101-enum_comma.h new file mode 100644 index 00000000..53c1a99e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33101-enum_comma.h @@ -0,0 +1,10 @@ + +void function(int a, + int b, + int c); + +enum Test { + A, B, + C, + D, E +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33102-enum_comma.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33102-enum_comma.h new file mode 100644 index 00000000..6c11f2b3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33102-enum_comma.h @@ -0,0 +1,12 @@ + +void function(int a, + int b, + int c); + +enum Test { + A + , B + , C + , D + , E +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33103-bug_858.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33103-bug_858.cpp new file mode 100644 index 00000000..1085f7db --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33103-bug_858.cpp @@ -0,0 +1,17 @@ +enum +{ + item1 = 123, + item2, // comment 2 +} + +enum +{ + item3, + item4, // comment 4 +} +enum { x, y,}; +enum { x, y = 0,}; +enum { x, y = 0,/*comment*/ }; +enum { x, y,}; +enum { x, y = 0,}; +enum { x, y = 0,/*comment*/ }; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33104-bug_858.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33104-bug_858.cpp new file mode 100644 index 00000000..c5ac560e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33104-bug_858.cpp @@ -0,0 +1,17 @@ +enum +{ + item1 = 123, + item2 // comment 2 +} + +enum +{ + item3, + item4 // comment 4 +} +enum { x, y }; +enum { x, y = 0 }; +enum { x, y = 0 /*comment*/ }; +enum { x, y }; +enum { x, y = 0 }; +enum { x, y = 0 /*comment*/ }; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33105-bug_1001.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33105-bug_1001.cpp new file mode 100644 index 00000000..d6104cd5 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33105-bug_1001.cpp @@ -0,0 +1,4 @@ +template< > +struct Bar< false >: Foo +{ +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33106-pos_bool_in_template.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33106-pos_bool_in_template.h new file mode 100644 index 00000000..f5fdb04e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33106-pos_bool_in_template.h @@ -0,0 +1,13 @@ +#include <type_traits>
+
+template<typename U,
+ typename V,
+ typename = std::enable_if_t<!std::is_convertible<U,
+ V>::value &&
+ !std::is_same<U,
+ V>::value> >
+void foo(U &&u,
+ V &&v)
+{
+
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33107-Issue_2688.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33107-Issue_2688.cpp new file mode 100644 index 00000000..ac97ff3a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33107-Issue_2688.cpp @@ -0,0 +1,7 @@ +{ + std::vector<Object> someVector = { + flag && (hasFeedback != nil) + ? objectA + : objectB, + }; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33108-Issue_2045.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33108-Issue_2045.cpp new file mode 100644 index 00000000..a1670ffc --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33108-Issue_2045.cpp @@ -0,0 +1,12 @@ +void wpa_smk_send_error(struct wpa_authenticator *wpa_auth, + struct wpa_state_machine *sm, const u8 *peer, + u16 mui, u16 error_type) +{ + u8 kde[2 + RSN_SELECTOR_LEN + ETH_ALEN + + 2 + RSN_SELECTOR_LEN + sizeof(struct rsn_error_kde)]; + u8 *pos; + struct rsn_error_kde error; + + wpa_auth_logger(wpa_auth, sm->addr, LOGGER_DEBUG, + "Sending SMK Error"); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33109-Issue_3205.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33109-Issue_3205.cpp new file mode 100644 index 00000000..99767289 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33109-Issue_3205.cpp @@ -0,0 +1 @@ +vec_& operator+=(vec_&, const vec_&); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33110-enum.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33110-enum.cpp new file mode 100644 index 00000000..b4f7df56 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33110-enum.cpp @@ -0,0 +1,203 @@ +enum class angle_state_e : unsigned int +{ + NONE = 0, + OPEN = 1, //'<' found + CLOSE = 2, //'>' found +}; + +// align.cpp +enum class comment_align_e : unsigned int +{ + REGULAR, + BRACE, + ENDIF, +}; + +// chunk.h +enum class E_Scope : unsigned int +{ + ALL, /**< search in all kind of chunks */ + PREPROC, /**< search only in preprocessor chunks */ +}; + +// chunk.cpp +enum class E_Direction : unsigned int +{ + FORWARD, + BACKWARD +}; + +// combine.cpp +{ + enum class angle_state_e : unsigned int + { + NONE = 0, + OPEN = 1, // '<' found + CLOSE = 2, // '>' found + }; +} + +// indent.cpp +enum class align_mode_e : unsigned int +{ + SHIFT, /* shift relative to the current column */ + KEEP_ABS, /* try to keep the original absolute column */ + KEEP_REL, /* try to keep the original gap */ +}; + +// align_stack.h +{ + enum StarStyle + { + SS_IGNORE, // don't look for prev stars + SS_INCLUDE, // include prev * before add + SS_DANGLE // include prev * after add + }; +} + +// log_levels.h +enum log_sev_t +{ + LSYS = 0, + LERR = 1, + LWARN = 2, + LNOTE = 3, + LINFO = 4, + LDATA = 5, + + LFILELIST = 8, /* Files in the file list file */ + LLINEENDS = 9, /* Show which line endings are used */ + LCASTS = 10, /* align casts */ + LALBR = 11, /* align braces */ + LALTD = 12, /* Align Typedef */ + LALPP = 13, /* align #define */ + LALPROTO = 14, /* align prototype */ + LALNLC = 15, /* align backslash-newline */ + LALTC = 16, /* align trailing comments */ + LALADD = 17, /* align add */ + LALASS = 18, /* align assign */ + LFVD = 19, /* fix_var_def */ + LFVD2 = 20, /* fix_var_def-2 */ + LINDENT = 21, /* indent_text */ + LINDENT2 = 22, /* indent_text tab level */ + LINDPSE = 23, /* indent_text stack */ + LINDPC = 24, /* indent play-by-play */ + LNEWLINE = 25, /* newlines */ + LPF = 26, /* Parse Frame */ + LSTMT = 27, /* Marking statements/expressions */ + LTOK = 28, /* Tokenize */ + LALRC = 29, /* align right comment */ + LCMTIND = 30, /* Comment Indent */ + LINDLINE = 31, /* indent line */ + LSIB = 32, /* Scan IB */ + LRETURN = 33, /* add/remove parens for return */ + LBRDEL = 34, /* brace removal */ + LFCN = 35, /* function detection */ + LFCNP = 36, /* function parameters */ + LPCU = 37, /* parse cleanup */ + LDYNKW = 38, /* dynamic keywords */ + LOUTIND = 39, /* output indent */ + LBCSAFTER = 40, /* Brace cleanup stack - after each token */ + LBCSPOP = 41, /* Brace cleanup stack - log pops */ + LBCSPUSH = 42, /* Brace cleanup stack - log push */ + LBCSSWAP = 43, /* Brace cleanup stack - log swaps */ + LFTOR = 44, /* Class Ctor or Dtor */ + LAS = 45, /* align_stack */ + LPPIS = 46, /* Preprocessor Indent and Space */ + LTYPEDEF = 47, /* Typedef and function types */ + LVARDEF = 48, /* Variable def marking */ + LDEFVAL = 49, /* define values */ + LPVSEMI = 50, /* Pawn: virtual semicolons */ + LPFUNC = 51, /* Pawn: function recognition */ + LSPLIT = 52, /* Line splitting */ + LFTYPE = 53, /* Function type detection */ + LTEMPL = 54, /* Template detection */ + LPARADD = 55, /* adding parens in if/while */ + LPARADD2 = 56, /* adding parens in if/while - details */ + LBLANKD = 57, /* blank line details */ + LTEMPFUNC = 58, /* Template function detection */ + LSCANSEMI = 59, /* scan semi colon removal */ + LDELSEMI = 60, /* Removing semicolons */ + LFPARAM = 61, /* Testing for a full parameter */ + LNL1LINE = 62, /* NL check for 1 liners */ + LPFCHK = 63, /* Parse Frame check fcn call */ + LAVDB = 64, /* align var def braces */ + LSORT = 65, /* Sorting */ + LSPACE = 66, /* Space */ + LALIGN = 67, /* align */ + LALAGAIN = 68, /* align again */ + LOPERATOR = 69, /* operator */ + LASFCP = 70, /* Align Same Function Call Params */ + LINDLINED = 71, /* indent line details */ + LBCTRL = 72, /* beautifier control */ + LRMRETURN = 73, /* remove 'return;' */ + LPPIF = 74, /* #if/#else/#endif pair processing */ + LMCB = 75, /* mod_case_brace */ + LBRCH = 76, /* if brace chain */ + LFCNR = 77, /* function return type */ + LOCCLASS = 78, /* OC Class stuff */ + LOCMSG = 79, /* OC Message stuff */ + LBLANK = 80, /* Blank Lines */ + LOBJCWORD = 81, /* Convert keyword to CT_WORD in certain circumstances */ + LCHANGE = 82, /* something changed */ + LCONTTEXT = 83, /* comment cont_text set */ + LANNOT = 84, /* Java annotation */ + LOCBLK = 85, /* OC Block stuff */ + LFLPAREN = 86, /* Flag paren */ + LOCMSGD = 87, /* OC Message declaration */ + LINDENTAG = 88, /* indent again */ + LNFD = 89, /* newline-function-def */ + LJDBI = 90, /* Java Double Brace Init */ + LSETPAR = 91, /* Chunk::SetParentTypeReal() */ + LSETTYP = 92, /* Chunk::SetTypeReal() */ + LSETFLG = 93, /* set_chunk_flags() */ + LNLFUNCT = 94, /* newlines before function */ + LCHUNK = 95, /* Add or del chunk */ + LGUY98 = 98, /* for guy-test */ + LGUY = 99, /* for guy-test */ +}; + +// options.h +enum argtype_e +{ + AT_BOOL, /**< true / false */ + AT_IARF, /**< Ignore / Add / Remove / Force */ + AT_NUM, /**< Number */ + AT_LINE, /**< Line Endings */ + AT_POS, /**< start/end or Trail/Lead */ + AT_STRING, /**< string value */ + AT_UNUM, /**< unsigned Number */ +}; + +enum argval_t +{ + AV_IGNORE = 0, + AV_ADD = 1, + AV_REMOVE = 2, + AV_FORCE = 3, /**< remove + add */ + AV_NOT_DEFINED = 4 /* to be used with QT, SIGNAL SLOT macros */ +}; + +enum lineends_e +{ + LE_LF, /* "\n" */ + LE_CRLF, /* "\r\n" */ + LE_CR, /* "\r" */ + + LE_AUTO, /* keep last */ +}; + +enum tokenpos_e +{ + TP_IGNORE = 0, /* don't change it */ + TP_BREAK = 1, /* add a newline before or after the if not present */ + TP_FORCE = 2, /* force a newline on one side and not the other */ + TP_LEAD = 4, /* at the start of a line or leading if wrapped line */ + TP_LEAD_BREAK = (TP_LEAD | TP_BREAK), + TP_LEAD_FORCE = (TP_LEAD | TP_FORCE), + TP_TRAIL = 8, /* at the end of a line or trailing if wrapped line */ + TP_TRAIL_BREAK = (TP_TRAIL | TP_BREAK), + TP_TRAIL_FORCE = (TP_TRAIL | TP_FORCE), + TP_JOIN = 16, /* remove newlines on both sides */ +}; + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33120-Issue_2149.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33120-Issue_2149.cpp new file mode 100644 index 00000000..1266bd7b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33120-Issue_2149.cpp @@ -0,0 +1,7 @@ +namespace +{ + enum EnumValue + { + EnumValue1 = 1 << 1 + }; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33150-bug_i_753.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33150-bug_i_753.cpp new file mode 100644 index 00000000..9aa764a4 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33150-bug_i_753.cpp @@ -0,0 +1,9 @@ +void Test::init() +{ + connect( m_ppcCom, + SIGNAL(sigReceivedBundle(QString)), + SLOT(doProcessBundle(QString)) ); + connect( m_ppcCom, + SIGNAL(sigReceivedBundle), + SLOT(doProcessBundle)); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33151-bug_i_752.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33151-bug_i_752.cpp new file mode 100644 index 00000000..da8fe9f5 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33151-bug_i_752.cpp @@ -0,0 +1,14 @@ +int a() +{ + for(QStringList::const_iterator codesIt = _codes.constBegin(); codesIt != _codes.constEnd(); ++codesIt) { + if( // Current codes enough to compare: + ( ( *codesIt ).size() <= strId ) || + // Character on this slot was not readable: + ( ( *codesIt ).at( strId ) == m_wildcard ) || + // This character is matching: + ( code.at( strId ) == ( *codesIt ).at( strId ) ) ) { + // Ignore this slot: + continue; + } + } +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33152-bug_1004.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33152-bug_1004.cpp new file mode 100644 index 00000000..f072a583 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33152-bug_1004.cpp @@ -0,0 +1,14 @@ +int main() +{ + int b = 3; + int* p = &b; + + // Should stay as b * *p + int a = b * *p; + + // Correctly formats as a * b; + int c = b * a; + + // Correctly formats as d = *p; + int d = *p; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33160-bug_1112.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33160-bug_1112.cpp new file mode 100644 index 00000000..da95fcb6 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33160-bug_1112.cpp @@ -0,0 +1,2 @@ +::std::vector<int>& foo(); +std::vector<int>& bar(); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33161-byref-3.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33161-byref-3.cpp new file mode 100644 index 00000000..8c51bf46 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33161-byref-3.cpp @@ -0,0 +1,11 @@ +void test(void) { + auto const ic = 1; + auto iv = 1; + auto const& ric = ic; + auto& riv = iv; + const auto& ric2 = ic; + if (auto const& r(ric); r > 0) { + } + if (auto& r(riv); r > 0) { + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33162-sp_not_not.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33162-sp_not_not.cpp new file mode 100644 index 00000000..42306dad --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33162-sp_not_not.cpp @@ -0,0 +1,3 @@ +if (! hello) { } +if (!! hello) { } +if (!!! hello) { } diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33180-pp_multi_comment.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33180-pp_multi_comment.cpp new file mode 100644 index 00000000..bfe1e1d1 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33180-pp_multi_comment.cpp @@ -0,0 +1,12 @@ +#define CTOR(i, _) : \ + T(X()), \ +/* + * multi + */ \ + \ + y() \ +{ } +main() +{ +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33181-Issue_2759.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33181-Issue_2759.cpp new file mode 100644 index 00000000..cbe9c4a5 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33181-Issue_2759.cpp @@ -0,0 +1,6 @@ +Foo::Foo(int a, + int b) + : a_(a), // the comment should stay here + b_(b) +{ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33182-Issue_2794.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33182-Issue_2794.cpp new file mode 100644 index 00000000..16de515b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33182-Issue_2794.cpp @@ -0,0 +1,24 @@ +int +main() +{ + int i, j, k, l, m, q; + + i = rand(); + k = rand(); + l = rand(); + m = rand(); + j = rand(); + q = i * j + (2 * l) /m - ( 100 * k ) + k * k - i * i + 3000 * j + 1000; /* + * this + * is + * a + * very + * long + * trailing + * c + * comment + */ + +// the trailing * */ above should be */ +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33200-first_len_minimum.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33200-first_len_minimum.cpp new file mode 100644 index 00000000..c33d9e03 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33200-first_len_minimum.cpp @@ -0,0 +1,4 @@ +/* + a + b +*/ diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33201-indent_ctor_members_twice.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33201-indent_ctor_members_twice.cpp new file mode 100644 index 00000000..3b1bea1c --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33201-indent_ctor_members_twice.cpp @@ -0,0 +1,5 @@ +Foo::Foo() : + Base(12), + mValue(24) { + func(); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33202-initlist_leading_commas.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33202-initlist_leading_commas.cpp new file mode 100644 index 00000000..a3bc4a2a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33202-initlist_leading_commas.cpp @@ -0,0 +1,5 @@ +MyClass::MyClass(Type *var1, Type *var2) : + BaseClass(parent), + mVar1(var1), + mVar2(var2) { +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33203-Issue_2574.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33203-Issue_2574.cpp new file mode 100644 index 00000000..bd88347d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33203-Issue_2574.cpp @@ -0,0 +1,11 @@ +#include <pybind11/pybind11.h> +namespace py = pybind11; +PYBIND11_MODULE(example, m) +{ + py::class_<Pet>(m, "Pet") + .def(py::init<const std::string&>()) + .def("setName_T", &Pet::setName) + .def("getName", &Pet::getName); +} auto three()->int { + return 3; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33204-Issue_2582.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33204-Issue_2582.cpp new file mode 100644 index 00000000..adf9bfe9 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33204-Issue_2582.cpp @@ -0,0 +1,3 @@ +int fail = doSomething( + argument +).doNotIndentMe(); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33205-Issue_3198.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33205-Issue_3198.cpp new file mode 100644 index 00000000..8dd234b7 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33205-Issue_3198.cpp @@ -0,0 +1,4 @@ +enum class Flags : std::int64_t +{ + MyFlag +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33210-templates4.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33210-templates4.cpp new file mode 100644 index 00000000..10b96e4a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33210-templates4.cpp @@ -0,0 +1,17 @@ +#define FOO(X) \ +template <unsigned _blk_sz, typename _run_type, class __pos_type> \ +inline X<_blk_sz, _run_type, __pos_type> operator - ( \ +const X<_blk_sz, _run_type, __pos_type> & a, \ +typename X<_blk_sz, _run_type, __pos_type>::_pos_type off) \ +{ \ +return X<_blk_sz, _run_type, __pos_type>(a.array, a.pos - off); \ +} \ +template <unsigned _blk_sz, typename _run_type, class __pos_type> \ +inline X<_blk_sz, _run_type, __pos_type> & operator -= ( \ +X < _blk_sz, _run_type, __pos_type > & a, \ +typename X<_blk_sz, _run_type, __pos_type>::_pos_type off) \ +{ \ +a.pos -= off; \ +return a; \ +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33211-pp_multi_comment.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33211-pp_multi_comment.cpp new file mode 100644 index 00000000..5690e3a6 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33211-pp_multi_comment.cpp @@ -0,0 +1,12 @@ +#define CTOR(i, _) : \ + T(X()), \ +/* + * multi + */ \ +\ + y() \ +{ } +main() +{ +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33212-pp-define-indent.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33212-pp-define-indent.cpp new file mode 100644 index 00000000..78dc4c98 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33212-pp-define-indent.cpp @@ -0,0 +1,35 @@ + +#define outpsize +#define some(f)\ +foo(f) + +class CRC +{ +public: + int foo; +// Initial CRC Start Value + #define 24BITCRC ((ULONG) 0x00864CFB) // This line is not aligned with the other lines + char ch; +#define MULTI LINE DEFINE \ + in column 0 \ +that spans +//// Operations //// +public: + ... +} + +{ +#if defined(WIN32) + SYSTEMTIME st; + DWORD ThreadId; +#else + struct timeval mytv; + struct tm *mytm; + pid_t ProcessId; +#endif + +#if SOME COND + (void)loop; +#endif +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33213-disable_macro.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33213-disable_macro.cpp new file mode 100644 index 00000000..7e64f416 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33213-disable_macro.cpp @@ -0,0 +1,24 @@ +#include <stdio.h> + +// this macro should NOT be modified ... +#define CHK(...) \ + do \ + { \ + a+=1; \ + a=b=0; \ + c<<1; \ + } while (0+0) + + +// ... whereas this should be indented and formatted +int main() +{ + int a,b,c = 0; + if (a < c) + { + c += 1; + } + a = b = 0; + c << 1; + CHK; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33214-Issue_2742.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33214-Issue_2742.cpp new file mode 100644 index 00000000..66d12fec --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33214-Issue_2742.cpp @@ -0,0 +1,7 @@ + +#define FOO \ +\ + int my_type; \ + int a; \ + float b; \ + double c; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33215-Issue_3055.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33215-Issue_3055.cpp new file mode 100644 index 00000000..d23a0d56 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33215-Issue_3055.cpp @@ -0,0 +1,12 @@ +#ifndef ABC +#define ABC + +#ifdef XYZ1 +extern "C" { +#endif + +#ifdef XYZ2 +} +#endif + +#endif diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33216-Issue_3055-a.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33216-Issue_3055-a.cpp new file mode 100644 index 00000000..21a5c35c --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33216-Issue_3055-a.cpp @@ -0,0 +1,13 @@ +#ifndef ABC +# define ABC + +# ifdef XYZ1 +extern "C" { +# endif + +# ifdef XYZ2 +} +# endif + +#endif +int a; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33217-Issue_3113.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33217-Issue_3113.cpp new file mode 100644 index 00000000..63090f4a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/33217-Issue_3113.cpp @@ -0,0 +1 @@ +#define CONTINUE_IF(expr) { if ((expr)) continue; } diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34001-nl_before_after.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34001-nl_before_after.h new file mode 100644 index 00000000..8cdc7273 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34001-nl_before_after.h @@ -0,0 +1,118 @@ +namespace A { + +namespace S { + +class C +{ +public: + virtual ~C() + { + } + + virtual void addSearch(const int &col) = 0; + + virtual void removeSearch(int id) = 0; +}; + +} // namespace S + +} // namespace A + +namespace B { + +// This is a comment! +class D +{ +public: + D(); +}; + +} // namespace B + +// This is also a comment! +class E +{ +public: + E(); +}; + +namespace F { +} + +void foo(); + +class G +{ +}; + +void bar(); + +void foo2(); + +namespace E +{ +} + +void bar2(); + +void foo3(); + +namespace F +{ +} + +void bar3(); + +void foo4(); + +class I +{ +}; + +using namespace F; + +namespace M +{ +void bar4(); + +/* multiline test comment + before class */ +template<typename ... Args> +// test comment between template specification and associated class +class H +{ + // nested class + template<typename ...> + friend class I; + friend class J; + + // nested class K + template<typename T> + class K + { + + // double-nested class L + class L { }; + + }; + +}; + +} + +class AA; +class AB; + +namespace BA +{ +class BB; +class BC; + +class BD +{ +public: + friend class BE; + BD(); +}; + +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34002-bug_i_793.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34002-bug_i_793.cpp new file mode 100644 index 00000000..b6b6a7ab --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34002-bug_i_793.cpp @@ -0,0 +1,4 @@ +static void h() +{ + typedef int IntGroup; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34003-nl_max_blank_in_func.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34003-nl_max_blank_in_func.cpp new file mode 100644 index 00000000..cd1083ee --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34003-nl_max_blank_in_func.cpp @@ -0,0 +1,114 @@ +//regular function +void func0() +{ + return; +} +// ======================================================================== +//member function +void cls::func1() +{ + return; +} +// ======================================================================== +//lambda function +const auto l = [](){ + return 1; + }; +// ======================================================================== +//regular function in class +class cls +{ +public: + + + + +void func0() +{ + return; +} + + + + +} +// ======================================================================== +//member function in class + +// ======================================================================== +//lambda function in class +class cls +{ +pubic: + + + + +const auto l = [](){ + return 1; + }; + + + + +} +// ======================================================================== +//regular function in class in namespace +namespace ns +{ + + + + +class cls +{ +public: + + + + +void func0() +{ + return; +} + + + + +} + + + + +} +// ======================================================================== +//member function in class in namespace + +// ======================================================================== +//lambda function in class in namespace +namespace ns +{ + + + + +class cls +{ +pubic: + + + + +const auto l = [](){ + return 1; + }; + + + + +} + + + + +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34004-nl_max_blank_in_func.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34004-nl_max_blank_in_func.cpp new file mode 100644 index 00000000..c2f8dc36 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34004-nl_max_blank_in_func.cpp @@ -0,0 +1,135 @@ +//regular function +void func0() +{ + + + + return; +} +// ======================================================================== +//member function +void cls::func1() +{ + + + + return; +} +// ======================================================================== +//lambda function +const auto l = [](){ + + + + return 1; + }; +// ======================================================================== +//regular function in class +class cls +{ +public: + + + + +void func0() +{ + + + + return; +} + + + + +} +// ======================================================================== +//member function in class + +// ======================================================================== +//lambda function in class +class cls +{ +pubic: + + + + +const auto l = [](){ + + + + return 1; + }; + + + + +} +// ======================================================================== +//regular function in class in namespace +namespace ns +{ + + + + +class cls +{ +public: + + + + +void func0() +{ + + + + return; +} + + + + +} + + + + +} +// ======================================================================== +//member function in class in namespace + +// ======================================================================== +//lambda function in class in namespace +namespace ns +{ + + + + +class cls +{ +pubic: + + + + +const auto l = [](){ + + + + return 1; + }; + + + + +} + + + + +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34005-nl_max_blank_in_func.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34005-nl_max_blank_in_func.cpp new file mode 100644 index 00000000..738f3bf6 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34005-nl_max_blank_in_func.cpp @@ -0,0 +1,142 @@ +//regular function +void func0() +{ + + + + + return; +} +// ======================================================================== +//member function +void cls::func1() +{ + + + + + return; +} +// ======================================================================== +//lambda function +const auto l = [](){ + + + + + return 1; + }; +// ======================================================================== +//regular function in class +class cls +{ +public: + + + + +void func0() +{ + + + + + return; +} + + + + +} +// ======================================================================== +//member function in class + +// ======================================================================== +//lambda function in class +class cls +{ +pubic: + + + + +const auto l = [](){ + + + + + return 1; + }; + + + + +} +// ======================================================================== +//regular function in class in namespace +namespace ns +{ + + + + +class cls +{ +public: + + + + +void func0() +{ + + + + + return; +} + + + + +} + + + + +} +// ======================================================================== +//member function in class in namespace + +// ======================================================================== +//lambda function in class in namespace +namespace ns +{ + + + + +class cls +{ +pubic: + + + + +const auto l = [](){ + + + + + return 1; + }; + + + + +} + + + + +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34006-bug_i_575.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34006-bug_i_575.cpp new file mode 100644 index 00000000..4c25fb75 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34006-bug_i_575.cpp @@ -0,0 +1,8 @@ +void Foo::doo() +{ + m_stackCache[m_currentStackNr]->operator [](0) = new QStandardItem(QString::number(m_currentStackNr)); + m_stackCache[m_currentStackNr]->operator [](1) = new QStandardItem(tr("OK")); + m_stackCache[m_currentStackNr]->operator [](2) = new QStandardItem("0"); + m_stackCache[m_currentStackNr]->operator [](3) = new QStandardItem("0"); + m_stackCache[m_currentStackNr]->operator [](4) = new QStandardItem(); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34007-bug_i_928.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34007-bug_i_928.cpp new file mode 100644 index 00000000..78b214bd --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34007-bug_i_928.cpp @@ -0,0 +1,12 @@ +namespace Test1 { namespace Test { + +CodeConstructor::CodeConstructor() +{ +} + +CodeConstructor::getSomething() +{ + return 0; +} + +}} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34100-bug_i_525.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34100-bug_i_525.cpp new file mode 100644 index 00000000..b810afe0 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34100-bug_i_525.cpp @@ -0,0 +1,13 @@ +EXEC SQL BEGIN DECLARE SECTION; +static char *tbuf; +EXEC SQL END DECLARE SECTION; + +void myfunc1() +{ + exec sql execute immediate :tbuf; +} + +void myfunc2() +{ + EXEC SQL EXECUTE IMMEDIATE :tbuf; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34101-bug_i_646.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34101-bug_i_646.cpp new file mode 100644 index 00000000..f89b6416 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34101-bug_i_646.cpp @@ -0,0 +1 @@ +friend class ::MultiLabelMeshPipeline; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34105-bug_i_663.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34105-bug_i_663.cpp new file mode 100644 index 00000000..2a473bc7 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34105-bug_i_663.cpp @@ -0,0 +1,19 @@ +void test() +{ + switch ( n ) + { + case 1: + std::cout << "1"; + break; + + case 2: + { + std::cout << "2"; + } + break; + + case 3: + { std::cout << "3"; } + break; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34108-bug_i_666.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34108-bug_i_666.cpp new file mode 100644 index 00000000..212a8656 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34108-bug_i_666.cpp @@ -0,0 +1,12 @@ +bool test() +{ + if ( true ) + { + i = 10; + } + else + if ( true ) + { + i = 10; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34112-bug_i_889.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34112-bug_i_889.cpp new file mode 100644 index 00000000..5b803a0e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34112-bug_i_889.cpp @@ -0,0 +1,8 @@ +a::b c() +{ + mapped_file_source abc((int)CW1A(sTemp)); + mapped_file_source abc((int)::CW2A(sTemp)); + mapped_file_source abc((int)A::CW3A(sTemp)); +} + +boost::iostreams::mapped_file_source pdf((LPSTR)ATL::CW2A(sTemp)); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34113-bug_902.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34113-bug_902.cpp new file mode 100644 index 00000000..ada480c0 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34113-bug_902.cpp @@ -0,0 +1,76 @@ +// unc_add_option("sp_cond_colon", UO_sp_cond_colon, AT_IARF, +// "Add or remove space around the ':' in 'b ? t : f'"); +// unc_add_option("sp_cond_question", UO_sp_cond_question, AT_IARF, +// "Add or remove space around the '?' in 'b ? t : f'"); +void detect_options(void) +{ + detect_space_options(); +} + +int i = 0; +//a +void a(){ + return 0; +} +//0 +/*b*/ +void b(){ + return 0; +} +/*0*/ +//c +void c(){ + return 0; +} +//d +//d +//d +void d(){ + return 0; +} +//0 +//h +//h +void h(){ + return 0; +} +/*0*/ +/*e*/ +void e(){ + return 0; +} +void f(){ + return 0; +} + +int i = 0; +void g(){ + return 0; +} +void i(){ + return 0; +} +void j(){ + return 0; +} +void k(){ + return 0; +} +//0 +void l(){ + return 0; +} +/* + * 0 + */ +void m(){ + return 0; +} +/* + * n + * n + * n + */ +void n(){ + return 0; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34114-bug_902.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34114-bug_902.cpp new file mode 100644 index 00000000..af6bdb44 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34114-bug_902.cpp @@ -0,0 +1,97 @@ +// unc_add_option("sp_cond_colon", UO_sp_cond_colon, AT_IARF, +// "Add or remove space around the ':' in 'b ? t : f'"); +// unc_add_option("sp_cond_question", UO_sp_cond_question, AT_IARF, +// "Add or remove space around the '?' in 'b ? t : f'"); + +void detect_options(void) +{ + detect_space_options(); +} + +int i = 0; + +//a +void a(){ + return 0; +} + +//0 + +/*b*/ +void b(){ + return 0; +} + +/*0*/ + +//c +void c(){ + return 0; +} + +//d +//d +//d +void d(){ + return 0; +} + +//0 + +//h +//h +void h(){ + return 0; +} + +/*0*/ + +/*e*/ +void e(){ + return 0; +} + +void f(){ + return 0; +} + +int i = 0; + +void g(){ + return 0; +} + +void i(){ + return 0; +} + +void j(){ + return 0; +} + +void k(){ + return 0; +} + +//0 + +void l(){ + return 0; +} + +/* + * 0 + */ + +void m(){ + return 0; +} + +/* + * n + * n + * n + */ +void n(){ + return 0; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34115-nl_before_func_body_def.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34115-nl_before_func_body_def.cpp new file mode 100644 index 00000000..ff76cb2b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34115-nl_before_func_body_def.cpp @@ -0,0 +1,66 @@ +lass A +{ + void f0(void); + + template<typename T, typename U> + void g(T s, U t) + { + return; + } + void f1(void); + + template + <typename T, + typename U> + void h(T s, U t) + { + return; + } + void f2(void); + + template + <typename T, + typename U> + void + i(T s, U t) + { + return; + } + void f3(void); + + template + <typename T, + typename U> + void + j + (T s, U t) + { + return; + } + void f4(void); + + template + <typename T, + typename U> + void + k + ( + T s, U t) + { + return; + } + void f5(void); + + template + <typename T, + typename U> + void + l + ( + T s, + U t + ) + { + return; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34116-issue_2000.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34116-issue_2000.cpp new file mode 100644 index 00000000..f4f2c2bf --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34116-issue_2000.cpp @@ -0,0 +1,16 @@ +int bar; + +// blank line should be inserted before this comment +vector<int> foo() +{ + return {}; +} + +// blank line should be inserted before this comment, not after +template<> +volatile +int x:: +foo() +{ + return 0; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34117-extern_func.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34117-extern_func.cpp new file mode 100644 index 00000000..4de29e3c --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34117-extern_func.cpp @@ -0,0 +1,8 @@ +void foo(); + +// hello +extern "C" +BAR_EXPORT +void bar() +{ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34118-Issue_2163.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34118-Issue_2163.cpp new file mode 100644 index 00000000..afd04eb0 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34118-Issue_2163.cpp @@ -0,0 +1,23 @@ +/* + * m + */ +void +m(){ + return 0; +} + +/* + * n + */ +void +n(){ + return 0; +} + +/* + * n + */ +int& +n( int& x ){ + return x; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34120-bug_i_999.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34120-bug_i_999.cpp new file mode 100644 index 00000000..2a5d64a4 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34120-bug_i_999.cpp @@ -0,0 +1,2 @@ +template< class T, unsigned N = 0 > +constexpr unsigned long extent_v = extent< T, N >::value; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34121-bug_1717.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34121-bug_1717.cpp new file mode 100644 index 00000000..4116871f --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34121-bug_1717.cpp @@ -0,0 +1,10 @@ +class X14 +{ +public: +X14(); +~X14() = default; +X14(const X14& rhs) = default; +X14& operator=(const X14& rhs) = default; +X14(X14&& rhs) = delete; +X14& operator=(X14&& rhs) = delete; +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34122-Issue_2440.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34122-Issue_2440.cpp new file mode 100644 index 00000000..c52c30da --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34122-Issue_2440.cpp @@ -0,0 +1,2 @@ +#pragma region +#pragma endregion diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34123-Issue_2440_nl.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34123-Issue_2440_nl.cpp new file mode 100644 index 00000000..c52c30da --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34123-Issue_2440_nl.cpp @@ -0,0 +1,2 @@ +#pragma region +#pragma endregion diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34130-bug_i_1000.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34130-bug_i_1000.cpp new file mode 100644 index 00000000..6e1e7a0e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34130-bug_i_1000.cpp @@ -0,0 +1,8 @@ +int main() +{ + // Newline inserted between '}' and ')' + v.push_back({ 2, 3.0 } + ); + v.push_back({ 2, 3.0 } + ); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34131-bug_i_1000.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34131-bug_i_1000.cpp new file mode 100644 index 00000000..149353e7 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34131-bug_i_1000.cpp @@ -0,0 +1,6 @@ +int main() +{ + // Newline inserted between '}' and ')' + v.push_back({ 2, 3.0 }); + v.push_back({ 2, 3.0 }); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34132-new_op.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34132-new_op.cpp new file mode 100644 index 00000000..15386247 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34132-new_op.cpp @@ -0,0 +1,9 @@ +Foo* foo = new Foo(a,v); + +Foo* foo = new ( ptr,std::nothrow ) Foo[]; +Foo* foo = new ( ptr ) Foo(); +Foo* foo = new ( FOO(ptr)) Foo(); + +Foo* foo = new ( ptr,std::nothrow ) Foo[]; +Foo* foo = new ( ptr ) Foo(); +Foo* foo = new ( FOO(ptr)) Foo(); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34133-new_op.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34133-new_op.cpp new file mode 100644 index 00000000..ce690c94 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34133-new_op.cpp @@ -0,0 +1,9 @@ +Foo* foo = new Foo(a,v); + +Foo* foo = new ( ptr,std::nothrow ) Foo[]; +Foo* foo = new ( ptr ) Foo(); +Foo* foo = new ( FOO(ptr) ) Foo(); + +Foo* foo = new ( ptr,std::nothrow ) Foo[]; +Foo* foo = new ( ptr ) Foo(); +Foo* foo = new ( FOO(ptr) ) Foo(); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34134-new_op.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34134-new_op.cpp new file mode 100644 index 00000000..67dfa187 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34134-new_op.cpp @@ -0,0 +1,9 @@ +Foo* foo = new Foo(a,v); + +Foo* foo = new(ptr,std::nothrow)Foo[]; +Foo* foo = new(ptr)Foo(); +Foo* foo = new(FOO(ptr) )Foo(); + +Foo* foo = new(ptr,std::nothrow)Foo[]; +Foo* foo = new(ptr)Foo(); +Foo* foo = new(FOO(ptr) )Foo(); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34135-new_op.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34135-new_op.cpp new file mode 100644 index 00000000..044cd859 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34135-new_op.cpp @@ -0,0 +1,9 @@ +Foo* foo = new Foo(a,v); + +Foo* foo = new( ptr,std::nothrow)Foo[]; +Foo* foo = new( ptr)Foo(); +Foo* foo = new( FOO(ptr) )Foo(); + +Foo* foo = new ( ptr,std::nothrow) Foo[]; +Foo* foo = new ( ptr) Foo(); +Foo* foo = new ( FOO(ptr) ) Foo(); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34136-sp_balance_nested_parens.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34136-sp_balance_nested_parens.cpp new file mode 100644 index 00000000..0a6635d0 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34136-sp_balance_nested_parens.cpp @@ -0,0 +1,6 @@ +void MainWindow::createView() +{ + a = B( (c) + (d) ); + a = B( (c) + (d) ); + a = B( (c) + (d) ); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34140-bug_1027.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34140-bug_1027.cpp new file mode 100644 index 00000000..5ccafd2b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34140-bug_1027.cpp @@ -0,0 +1,5 @@ +int * fn1(); +mytype * fn2(); +myttype<float> * fn3(); +myttype<float> * myclass::fn4(); +myttype * myclass::fn5(); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34141-bug_1005.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34141-bug_1005.cpp new file mode 100644 index 00000000..01a457d0 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34141-bug_1005.cpp @@ -0,0 +1 @@ +friend void ::test::swap< >(future< T >&, future< T >&); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34142-I1112-1.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34142-I1112-1.cpp new file mode 100644 index 00000000..df27d1d6 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34142-I1112-1.cpp @@ -0,0 +1 @@ +::some::very::looong::_and::complicated::name::MyType& a;
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34143-I1112-2.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34143-I1112-2.cpp new file mode 100644 index 00000000..28a4489d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34143-I1112-2.cpp @@ -0,0 +1,7 @@ +class MyClass +{ +public: + void foo(::some::very::looong::_and::complicated::name::MyType& a, + ::some::very::looong::_and::complicated::name::MyType& b, + some::very::looong::_and::complicated::name::MyType& c); +};
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34144-I1112-3.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34144-I1112-3.cpp new file mode 100644 index 00000000..c95a6c40 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34144-I1112-3.cpp @@ -0,0 +1,5 @@ +class MyClass +{ +public: +::some::name* foo; +};
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34145-i683.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34145-i683.cpp new file mode 100644 index 00000000..255c6336 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34145-i683.cpp @@ -0,0 +1,47 @@ +#define concat0(a0,a1) a0 ??=??= a1 // trigraph ## +#define concat1(a0,a1) a0 %:%: a1 // digraph ## + + +#define STRINGIFY0(s) ??= s // trigraph # +#define STRINGIFY1(s) %: s // digraph # + +#define msg0(x) printf("%c: %d\n", ??=@ x, x) // trigraph #@ +#define msg1(x) printf("%c: %d\n", %:@ x, x) // digraph #@ + +// trigraph { +void x() +??< + + // trigraph [] + char a ??(??) = "a"; + // diigraph [] + char b <::> = "b"; + + bool f, g, h; + f = g = h = true; + + // trigraph || + f = g ??!??! h; + // trigraph |= + f ??!= g; + // trigraph | + f = g ??! h; + // trigraph ^= + f ??'= g; + // trigraph ^ + f = g ??' h; + + // trigraph [, ] + int m ??( 5 ??); + // digraph [, ] + int n <: 5 :>; + +// trigraph } + return; +??> + +// digraph {, } +int y() +<% + return 1; +%>
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34146-bug_1002.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34146-bug_1002.cpp new file mode 100644 index 00000000..0d72c80a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34146-bug_1002.cpp @@ -0,0 +1,8 @@ +template< class B1 = void, class B2 = void > +struct conjunction : bool_constant<B1::value1 && B2::value2> +{ +}; +template< class B1 = void, class B2 = void > +struct conjunction : bool_constant<B1::value1 && B2::value2> +{ +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34147-bug_1002.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34147-bug_1002.cpp new file mode 100644 index 00000000..02b85396 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34147-bug_1002.cpp @@ -0,0 +1,8 @@ +template< class B1 = void, class B2 = void > +struct conjunction : bool_constant<B1::value1&&B2::value2> +{ +}; +template< class B1 = void, class B2 = void > +struct conjunction : bool_constant<B1::value1&&B2::value2> +{ +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34148-bug_1139.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34148-bug_1139.cpp new file mode 100644 index 00000000..11a11a77 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34148-bug_1139.cpp @@ -0,0 +1,42 @@ +void a() +{ + if((tmp == nullptr) || + ((tmp->GetType() != CT_NUMBER) && + (tmp->GetType() != CT_SIZEOF) && + !(tmp->GetFlags() & (PCF_IN_STRUCT | PCF_IN_CLASS))) || + (tmp->GetType() == CT_NEWLINE) + ) + { + next->SetType(CT_LABEL_COLON); + } + else if ((tmp == nullptr) || + ((tmp->GetType() != CT_NUMBER) && + (tmp->GetType() != CT_SIZEOF) && + !(tmp->GetFlags() & (PCF_IN_STRUCT | PCF_IN_CLASS))) || + (tmp->GetType() == CT_NEWLINE) + ) + { + next->SetType(CT_LABEL_COLON); + } + + + if ((tmp == nullptr) || + ((tmp->GetType() != CT_NUMBER) && + (tmp->GetType() != CT_SIZEOF) && + !(tmp->GetFlags() & (PCF_IN_STRUCT | PCF_IN_CLASS))) || + (tmp->GetType() == CT_NEWLINE) + ) + { + next->SetType(CT_LABEL_COLON); + } + + if ((tmp == nullptr) || + ((tmp->GetType() != CT_NUMBER) && + (tmp->GetType() != CT_SIZEOF) && + !(tmp->GetFlags() & (PCF_IN_STRUCT | PCF_IN_CLASS))) || + (tmp->GetType() == CT_NEWLINE) + ) + { + next->SetType(CT_LABEL_COLON); + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34149-bug_1139.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34149-bug_1139.cpp new file mode 100644 index 00000000..88243de7 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34149-bug_1139.cpp @@ -0,0 +1,38 @@ +void a() +{ + if((tmp == nullptr) || + ((tmp->GetType() != CT_NUMBER) && + (tmp->GetType() != CT_SIZEOF) && + !(tmp->GetFlags() & (PCF_IN_STRUCT | PCF_IN_CLASS))) || + (tmp->GetType() == CT_NEWLINE)) + { + next->SetType(CT_LABEL_COLON); + } + else if ((tmp == nullptr) || + ((tmp->GetType() != CT_NUMBER) && + (tmp->GetType() != CT_SIZEOF) && + !(tmp->GetFlags() & (PCF_IN_STRUCT | PCF_IN_CLASS))) || + (tmp->GetType() == CT_NEWLINE)) + { + next->SetType(CT_LABEL_COLON); + } + + + if ((tmp == nullptr) || + ((tmp->GetType() != CT_NUMBER) && + (tmp->GetType() != CT_SIZEOF) && + !(tmp->GetFlags() & (PCF_IN_STRUCT | PCF_IN_CLASS))) || + (tmp->GetType() == CT_NEWLINE)) + { + next->SetType(CT_LABEL_COLON); + } + + if ((tmp == nullptr) || + ((tmp->GetType() != CT_NUMBER) && + (tmp->GetType() != CT_SIZEOF) && + !(tmp->GetFlags() & (PCF_IN_STRUCT | PCF_IN_CLASS))) || + (tmp->GetType() == CT_NEWLINE)) + { + next->SetType(CT_LABEL_COLON); + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34150-bug_1032.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34150-bug_1032.cpp new file mode 100644 index 00000000..80078efe --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34150-bug_1032.cpp @@ -0,0 +1 @@ +int variable1 = items_array[index<int>()]; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34151-bug_666.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34151-bug_666.cpp new file mode 100644 index 00000000..212a8656 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34151-bug_666.cpp @@ -0,0 +1,12 @@ +bool test() +{ + if ( true ) + { + i = 10; + } + else + if ( true ) + { + i = 10; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34152-bug_1068.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34152-bug_1068.cpp new file mode 100644 index 00000000..74fbc8e7 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34152-bug_1068.cpp @@ -0,0 +1,55 @@ +// No extra line added +void test1() +{ + if ( i == 10 ) + i++; +} + +// No extra line added +void test2() +{ + if ( i == 10 ) + { + i++; + } +} + +// No extra line added +void test3() +{ + if ( i == 10 ) + { + if ( j == 10 ) + { + i++; + } + } +} + +// No extra line added +void test4() +{ + if ( i == 10 ) + { + if ( j == 10 ) + i++; + } +} + +// Extra line added (after Uncrustify) +void test5() +{ + if ( i == 10 ) + if ( j == 10 ) + { + i++; + } +} + +// Extra line added (after Uncrustify) +void test6() +{ + if ( i == 10 ) + if ( j == 10 ) + i++; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34153-type_brace_init_lst.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34153-type_brace_init_lst.cpp new file mode 100644 index 00000000..356a7713 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34153-type_brace_init_lst.cpp @@ -0,0 +1,101 @@ +// Uncrustify does not process the intention of an using alias, +// unknown_kw will therefore no be parsed as known keyword +using unknown_kw = int; + +int main() +{ + // 'int' is a known c++ keyword + auto a0 = int + { 1 }; + auto b0 = unknown_kw + { 2 }; + auto c0 = ::unknown_kw + { 3 }; + auto d0 = (int) unknown_kw + { 4 }; + auto e0 = (int) ::unknown_kw + { 5 }; + auto f0 = static_cast<int>(unknown_kw + { 6 }); + auto g0 = static_cast<int>(::unknown_kw + { 7 }); + + auto a1 = int + {1}; + auto b1 = unknown_kw + {2}; + auto c1 = ::unknown_kw + {3}; + auto d1 = (int) unknown_kw + {4}; + auto e1 = (int) ::unknown_kw + {5}; + auto f1 = static_cast<int>(unknown_kw + {6}); + auto g1 = static_cast<int>(::unknown_kw + {7}); + + + + auto a2 = int + {1}; + auto b2 = unknown_kw + {2}; + auto c2 = ::unknown_kw + {3}; + auto d2 = (int) unknown_kw + {4}; + auto e2 = (int) ::unknown_kw + {5}; + auto f2 = static_cast<int>(unknown_kw + {6}); + auto g2 = static_cast<int>(::unknown_kw + {7}); + + + + auto a1 = int + { + + 1 + + }; + auto b1 = unknown_kw + { + + 2 + + }; + auto c1 = ::unknown_kw + { + + 3 + + }; + auto d1 = (int) unknown_kw + { + + 4 + + }; + auto e1 = (int) ::unknown_kw + { + + 5 + + }; + auto f1 = static_cast<int>(unknown_kw + { + + 6 + + }); + auto g1 = static_cast<int>(::unknown_kw + { + + 7 + + }); + + return 1; +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34154-type_brace_init_lst.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34154-type_brace_init_lst.cpp new file mode 100644 index 00000000..adc09173 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34154-type_brace_init_lst.cpp @@ -0,0 +1,73 @@ +// Uncrustify does not process the intention of an using alias, +// unknown_kw will therefore no be parsed as known keyword +using unknown_kw = int; + +int main() +{ + // 'int' is a known c++ keyword + auto a0 = int { 1 }; + auto b0 = unknown_kw { 2 }; + auto c0 = ::unknown_kw { 3 }; + auto d0 = (int) unknown_kw { 4 }; + auto e0 = (int) ::unknown_kw { 5 }; + auto f0 = static_cast<int>(unknown_kw { 6 }); + auto g0 = static_cast<int>(::unknown_kw { 7 }); + + auto a1 = int{1}; + auto b1 = unknown_kw{2}; + auto c1 = ::unknown_kw{3}; + auto d1 = (int) unknown_kw{4}; + auto e1 = (int) ::unknown_kw{5}; + auto f1 = static_cast<int>(unknown_kw{6}); + auto g1 = static_cast<int>(::unknown_kw{7}); + + + + auto a2 = int{1}; + auto b2 = unknown_kw{2}; + auto c2 = ::unknown_kw{3}; + auto d2 = (int) unknown_kw{4}; + auto e2 = (int) ::unknown_kw{5}; + auto f2 = static_cast<int>(unknown_kw{6}); + auto g2 = static_cast<int>(::unknown_kw{7}); + + + + auto a1 = int{ + + 1 + + }; + auto b1 = unknown_kw{ + + 2 + + }; + auto c1 = ::unknown_kw { + + 3 + + }; + auto d1 = (int) unknown_kw { + + 4 + + }; + auto e1 = (int) ::unknown_kw { + + 5 + + }; + auto f1 = static_cast<int>(unknown_kw { + + 6 + + }); + auto g1 = static_cast<int>(::unknown_kw { + + 7 + + }); + + return 1; +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34155-type_brace_init_lst.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34155-type_brace_init_lst.cpp new file mode 100644 index 00000000..7d62eafb --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34155-type_brace_init_lst.cpp @@ -0,0 +1,122 @@ +// Uncrustify does not process the intention of an using alias, +// unknown_kw will therefore no be parsed as known keyword +using unknown_kw = int; + +int main() +{ + // 'int' is a known c++ keyword + auto a0 = int { + 1 + }; + auto b0 = unknown_kw { + 2 + }; + auto c0 = ::unknown_kw { + 3 + }; + auto d0 = (int) unknown_kw { + 4 + }; + auto e0 = (int) ::unknown_kw { + 5 + }; + auto f0 = static_cast<int>(unknown_kw { + 6 + }); + auto g0 = static_cast<int>(::unknown_kw { + 7 + }); + + auto a1 = int{ + 1 + }; + auto b1 = unknown_kw{ + 2 + }; + auto c1 = ::unknown_kw{ + 3 + }; + auto d1 = (int) unknown_kw{ + 4 + }; + auto e1 = (int) ::unknown_kw{ + 5 + }; + auto f1 = static_cast<int>(unknown_kw{ + 6 + }); + auto g1 = static_cast<int>(::unknown_kw{ + 7 + }); + + + + auto a2 = int + + { + 1 + }; + auto b2 = unknown_kw + + { + 2 + }; + auto c2 = ::unknown_kw + + { + 3 + }; + auto d2 = (int) unknown_kw + + { + 4 + }; + auto e2 = (int) ::unknown_kw + + { + 5 + }; + auto f2 = static_cast<int>(unknown_kw + + { + 6 + }); + auto g2 = static_cast<int>(::unknown_kw + + { + 7 + }); + + + + auto a1 = int{ + 1 + + }; + auto b1 = unknown_kw{ + 2 + + }; + auto c1 = ::unknown_kw { + 3 + + }; + auto d1 = (int) unknown_kw { + 4 + + }; + auto e1 = (int) ::unknown_kw { + 5 + + }; + auto f1 = static_cast<int>(unknown_kw { + 6 + + }); + auto g1 = static_cast<int>(::unknown_kw { + 7 + + }); + + return 1; +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34156-type_brace_init_lst.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34156-type_brace_init_lst.cpp new file mode 100644 index 00000000..6519b4b1 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34156-type_brace_init_lst.cpp @@ -0,0 +1,59 @@ +// Uncrustify does not process the intention of an using alias, +// unknown_kw will therefore no be parsed as known keyword +using unknown_kw = int; + +int main() +{ + // 'int' is a known c++ keyword + auto a0 = int { 1 }; + auto b0 = unknown_kw { 2 }; + auto c0 = ::unknown_kw { 3 }; + auto d0 = (int) unknown_kw { 4 }; + auto e0 = (int) ::unknown_kw { 5 }; + auto f0 = static_cast<int>(unknown_kw { 6 }); + auto g0 = static_cast<int>(::unknown_kw { 7 }); + + auto a1 = int{1}; + auto b1 = unknown_kw{2}; + auto c1 = ::unknown_kw{3}; + auto d1 = (int) unknown_kw{4}; + auto e1 = (int) ::unknown_kw{5}; + auto f1 = static_cast<int>(unknown_kw{6}); + auto g1 = static_cast<int>(::unknown_kw{7}); + + + + auto a2 = int + + {1}; + auto b2 = unknown_kw + + {2}; + auto c2 = ::unknown_kw + + {3}; + auto d2 = (int) unknown_kw + + {4}; + auto e2 = (int) ::unknown_kw + + {5}; + auto f2 = static_cast<int>(unknown_kw + + {6}); + auto g2 = static_cast<int>(::unknown_kw + + {7}); + + + + auto a1 = int{1}; + auto b1 = unknown_kw{2}; + auto c1 = ::unknown_kw {3}; + auto d1 = (int) unknown_kw {4}; + auto e1 = (int) ::unknown_kw {5}; + auto f1 = static_cast<int>(unknown_kw {6}); + auto g1 = static_cast<int>(::unknown_kw {7}); + + return 1; +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34157-type_brace_init_lst.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34157-type_brace_init_lst.cpp new file mode 100644 index 00000000..6751c0fa --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34157-type_brace_init_lst.cpp @@ -0,0 +1,101 @@ +// Uncrustify does not process the intention of an using alias, +// unknown_kw will therefore no be parsed as known keyword +using unknown_kw = int; + +int main() +{ + // 'int' is a known c++ keyword + auto a0 = int { 1 + }; + auto b0 = unknown_kw { 2 + }; + auto c0 = ::unknown_kw { 3 + }; + auto d0 = (int) unknown_kw { 4 + }; + auto e0 = (int) ::unknown_kw { 5 + }; + auto f0 = static_cast<int>(unknown_kw { 6 + }); + auto g0 = static_cast<int>(::unknown_kw { 7 + }); + + auto a1 = int{1 + }; + auto b1 = unknown_kw{2 + }; + auto c1 = ::unknown_kw{3 + }; + auto d1 = (int) unknown_kw{4 + }; + auto e1 = (int) ::unknown_kw{5 + }; + auto f1 = static_cast<int>(unknown_kw{6 + }); + auto g1 = static_cast<int>(::unknown_kw{7 + }); + + + + auto a2 = int + + {1 + }; + auto b2 = unknown_kw + + {2 + }; + auto c2 = ::unknown_kw + + {3 + }; + auto d2 = (int) unknown_kw + + {4 + }; + auto e2 = (int) ::unknown_kw + + {5 + }; + auto f2 = static_cast<int>(unknown_kw + + {6 + }); + auto g2 = static_cast<int>(::unknown_kw + + {7 + }); + + + + auto a1 = int{ + + 1 + }; + auto b1 = unknown_kw{ + + 2 + }; + auto c1 = ::unknown_kw { + + 3 + }; + auto d1 = (int) unknown_kw { + + 4 + }; + auto e1 = (int) ::unknown_kw { + + 5 + }; + auto f1 = static_cast<int>(unknown_kw { + + 6 + }); + auto g1 = static_cast<int>(::unknown_kw { + + 7 + }); + + return 1; +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34158-type_brace_init_lst.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34158-type_brace_init_lst.cpp new file mode 100644 index 00000000..d5dcfdeb --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34158-type_brace_init_lst.cpp @@ -0,0 +1,73 @@ +// Uncrustify does not process the intention of an using alias, +// unknown_kw will therefore no be parsed as known keyword +using unknown_kw = int; + +int main() +{ + // 'int' is a known c++ keyword + auto a0 = int { 1 }; + auto b0 = unknown_kw { 2 }; + auto c0 = ::unknown_kw { 3 }; + auto d0 = (int) unknown_kw { 4 }; + auto e0 = (int) ::unknown_kw { 5 }; + auto f0 = static_cast<int>(unknown_kw { 6 }); + auto g0 = static_cast<int>(::unknown_kw { 7 }); + + auto a1 = int{1}; + auto b1 = unknown_kw{2}; + auto c1 = ::unknown_kw{3}; + auto d1 = (int) unknown_kw{4}; + auto e1 = (int) ::unknown_kw{5}; + auto f1 = static_cast<int>(unknown_kw{6}); + auto g1 = static_cast<int>(::unknown_kw{7}); + + + + auto a2 = int + + {1}; + auto b2 = unknown_kw + + {2}; + auto c2 = ::unknown_kw + + {3}; + auto d2 = (int) unknown_kw + + {4}; + auto e2 = (int) ::unknown_kw + + {5}; + auto f2 = static_cast<int>(unknown_kw + + {6}); + auto g2 = static_cast<int>(::unknown_kw + + {7}); + + + + auto a1 = int{ + + 1}; + auto b1 = unknown_kw{ + + 2}; + auto c1 = ::unknown_kw { + + 3}; + auto d1 = (int) unknown_kw { + + 4}; + auto e1 = (int) ::unknown_kw { + + 5}; + auto f1 = static_cast<int>(unknown_kw { + + 6}); + auto g1 = static_cast<int>(::unknown_kw { + + 7}); + + return 1; +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34159-type_brace_init_lst.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34159-type_brace_init_lst.cpp new file mode 100644 index 00000000..0b9bf31c --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34159-type_brace_init_lst.cpp @@ -0,0 +1,87 @@ +// Uncrustify does not process the intention of an using alias, +// unknown_kw will therefore no be parsed as known keyword +using unknown_kw = int; + +int main() +{ + // 'int' is a known c++ keyword + auto a0 = int { 1 }; + auto b0 = unknown_kw { 2 }; + auto c0 = ::unknown_kw { 3 }; + auto d0 = (int) unknown_kw { 4 }; + auto e0 = (int) ::unknown_kw { 5 }; + auto f0 = static_cast<int>(unknown_kw { 6 }); + auto g0 = static_cast<int>(::unknown_kw { 7 }); + + auto a1 = int {1}; + auto b1 = unknown_kw {2}; + auto c1 = ::unknown_kw {3}; + auto d1 = (int) unknown_kw {4}; + auto e1 = (int) ::unknown_kw {5}; + auto f1 = static_cast<int>(unknown_kw {6}); + auto g1 = static_cast<int>(::unknown_kw {7}); + + + + auto a2 = int + + {1}; + auto b2 = unknown_kw + + {2}; + auto c2 = ::unknown_kw + + {3}; + auto d2 = (int) unknown_kw + + {4}; + auto e2 = (int) ::unknown_kw + + {5}; + auto f2 = static_cast<int>(unknown_kw + + {6}); + auto g2 = static_cast<int>(::unknown_kw + + {7}); + + + + auto a1 = int { + + 1 + + }; + auto b1 = unknown_kw { + + 2 + + }; + auto c1 = ::unknown_kw { + + 3 + + }; + auto d1 = (int) unknown_kw { + + 4 + + }; + auto e1 = (int) ::unknown_kw { + + 5 + + }; + auto f1 = static_cast<int>(unknown_kw { + + 6 + + }); + auto g1 = static_cast<int>(::unknown_kw { + + 7 + + }); + + return 1; +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34160-type_brace_init_lst.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34160-type_brace_init_lst.cpp new file mode 100644 index 00000000..01c89132 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34160-type_brace_init_lst.cpp @@ -0,0 +1,87 @@ +// Uncrustify does not process the intention of an using alias, +// unknown_kw will therefore no be parsed as known keyword +using unknown_kw = int; + +int main() +{ + // 'int' is a known c++ keyword + auto a0 = int{ 1 }; + auto b0 = unknown_kw{ 2 }; + auto c0 = ::unknown_kw{ 3 }; + auto d0 = (int) unknown_kw{ 4 }; + auto e0 = (int) ::unknown_kw{ 5 }; + auto f0 = static_cast<int>(unknown_kw{ 6 }); + auto g0 = static_cast<int>(::unknown_kw{ 7 }); + + auto a1 = int{1}; + auto b1 = unknown_kw{2}; + auto c1 = ::unknown_kw{3}; + auto d1 = (int) unknown_kw{4}; + auto e1 = (int) ::unknown_kw{5}; + auto f1 = static_cast<int>(unknown_kw{6}); + auto g1 = static_cast<int>(::unknown_kw{7}); + + + + auto a2 = int + + {1}; + auto b2 = unknown_kw + + {2}; + auto c2 = ::unknown_kw + + {3}; + auto d2 = (int) unknown_kw + + {4}; + auto e2 = (int) ::unknown_kw + + {5}; + auto f2 = static_cast<int>(unknown_kw + + {6}); + auto g2 = static_cast<int>(::unknown_kw + + {7}); + + + + auto a1 = int{ + + 1 + + }; + auto b1 = unknown_kw{ + + 2 + + }; + auto c1 = ::unknown_kw{ + + 3 + + }; + auto d1 = (int) unknown_kw{ + + 4 + + }; + auto e1 = (int) ::unknown_kw{ + + 5 + + }; + auto f1 = static_cast<int>(unknown_kw{ + + 6 + + }); + auto g1 = static_cast<int>(::unknown_kw{ + + 7 + + }); + + return 1; +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34161-type_brace_init_lst.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34161-type_brace_init_lst.cpp new file mode 100644 index 00000000..cc79678f --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34161-type_brace_init_lst.cpp @@ -0,0 +1,87 @@ +// Uncrustify does not process the intention of an using alias, +// unknown_kw will therefore no be parsed as known keyword +using unknown_kw = int; + +int main() +{ + // 'int' is a known c++ keyword + auto a0 = int { 1 }; + auto b0 = unknown_kw { 2 }; + auto c0 = ::unknown_kw { 3 }; + auto d0 = (int) unknown_kw { 4 }; + auto e0 = (int) ::unknown_kw { 5 }; + auto f0 = static_cast<int>(unknown_kw { 6 }); + auto g0 = static_cast<int>(::unknown_kw { 7 }); + + auto a1 = int{ 1 }; + auto b1 = unknown_kw{ 2 }; + auto c1 = ::unknown_kw{ 3 }; + auto d1 = (int) unknown_kw{ 4 }; + auto e1 = (int) ::unknown_kw{ 5 }; + auto f1 = static_cast<int>(unknown_kw{ 6 }); + auto g1 = static_cast<int>(::unknown_kw{ 7 }); + + + + auto a2 = int + + { 1 }; + auto b2 = unknown_kw + + { 2 }; + auto c2 = ::unknown_kw + + { 3 }; + auto d2 = (int) unknown_kw + + { 4 }; + auto e2 = (int) ::unknown_kw + + { 5 }; + auto f2 = static_cast<int>(unknown_kw + + { 6 }); + auto g2 = static_cast<int>(::unknown_kw + + { 7 }); + + + + auto a1 = int{ + + 1 + + }; + auto b1 = unknown_kw{ + + 2 + + }; + auto c1 = ::unknown_kw { + + 3 + + }; + auto d1 = (int) unknown_kw { + + 4 + + }; + auto e1 = (int) ::unknown_kw { + + 5 + + }; + auto f1 = static_cast<int>(unknown_kw { + + 6 + + }); + auto g1 = static_cast<int>(::unknown_kw { + + 7 + + }); + + return 1; +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34162-type_brace_init_lst.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34162-type_brace_init_lst.cpp new file mode 100644 index 00000000..2d5dc62c --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34162-type_brace_init_lst.cpp @@ -0,0 +1,87 @@ +// Uncrustify does not process the intention of an using alias, +// unknown_kw will therefore no be parsed as known keyword +using unknown_kw = int; + +int main() +{ + // 'int' is a known c++ keyword + auto a0 = int {1}; + auto b0 = unknown_kw {2}; + auto c0 = ::unknown_kw {3}; + auto d0 = (int) unknown_kw {4}; + auto e0 = (int) ::unknown_kw {5}; + auto f0 = static_cast<int>(unknown_kw {6}); + auto g0 = static_cast<int>(::unknown_kw {7}); + + auto a1 = int{1}; + auto b1 = unknown_kw{2}; + auto c1 = ::unknown_kw{3}; + auto d1 = (int) unknown_kw{4}; + auto e1 = (int) ::unknown_kw{5}; + auto f1 = static_cast<int>(unknown_kw{6}); + auto g1 = static_cast<int>(::unknown_kw{7}); + + + + auto a2 = int + + {1}; + auto b2 = unknown_kw + + {2}; + auto c2 = ::unknown_kw + + {3}; + auto d2 = (int) unknown_kw + + {4}; + auto e2 = (int) ::unknown_kw + + {5}; + auto f2 = static_cast<int>(unknown_kw + + {6}); + auto g2 = static_cast<int>(::unknown_kw + + {7}); + + + + auto a1 = int{ + + 1 + + }; + auto b1 = unknown_kw{ + + 2 + + }; + auto c1 = ::unknown_kw { + + 3 + + }; + auto d1 = (int) unknown_kw { + + 4 + + }; + auto e1 = (int) ::unknown_kw { + + 5 + + }; + auto f1 = static_cast<int>(unknown_kw { + + 6 + + }); + auto g1 = static_cast<int>(::unknown_kw { + + 7 + + }); + + return 1; +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34163-type_brace_init_lst.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34163-type_brace_init_lst.cpp new file mode 100644 index 00000000..9be7507a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34163-type_brace_init_lst.cpp @@ -0,0 +1,87 @@ +// Uncrustify does not process the intention of an using alias, +// unknown_kw will therefore no be parsed as known keyword +using unknown_kw = int; + +int main() +{ + // 'int' is a known c++ keyword + auto a0 = int { 1 }; + auto b0 = unknown_kw { 2 }; + auto c0 = ::unknown_kw { 3 }; + auto d0 = (int) unknown_kw { 4 }; + auto e0 = (int) ::unknown_kw { 5 }; + auto f0 = static_cast<int>(unknown_kw { 6 }); + auto g0 = static_cast<int>(::unknown_kw { 7 }); + + auto a1 = int{ 1}; + auto b1 = unknown_kw{ 2}; + auto c1 = ::unknown_kw{ 3}; + auto d1 = (int) unknown_kw{ 4}; + auto e1 = (int) ::unknown_kw{ 5}; + auto f1 = static_cast<int>(unknown_kw{ 6}); + auto g1 = static_cast<int>(::unknown_kw{ 7}); + + + + auto a2 = int + + { 1}; + auto b2 = unknown_kw + + { 2}; + auto c2 = ::unknown_kw + + { 3}; + auto d2 = (int) unknown_kw + + { 4}; + auto e2 = (int) ::unknown_kw + + { 5}; + auto f2 = static_cast<int>(unknown_kw + + { 6}); + auto g2 = static_cast<int>(::unknown_kw + + { 7}); + + + + auto a1 = int{ + + 1 + + }; + auto b1 = unknown_kw{ + + 2 + + }; + auto c1 = ::unknown_kw { + + 3 + + }; + auto d1 = (int) unknown_kw { + + 4 + + }; + auto e1 = (int) ::unknown_kw { + + 5 + + }; + auto f1 = static_cast<int>(unknown_kw { + + 6 + + }); + auto g1 = static_cast<int>(::unknown_kw { + + 7 + + }); + + return 1; +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34164-type_brace_init_lst.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34164-type_brace_init_lst.cpp new file mode 100644 index 00000000..68565614 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34164-type_brace_init_lst.cpp @@ -0,0 +1,87 @@ +// Uncrustify does not process the intention of an using alias, +// unknown_kw will therefore no be parsed as known keyword +using unknown_kw = int; + +int main() +{ + // 'int' is a known c++ keyword + auto a0 = int {1 }; + auto b0 = unknown_kw {2 }; + auto c0 = ::unknown_kw {3 }; + auto d0 = (int) unknown_kw {4 }; + auto e0 = (int) ::unknown_kw {5 }; + auto f0 = static_cast<int>(unknown_kw {6 }); + auto g0 = static_cast<int>(::unknown_kw {7 }); + + auto a1 = int{1}; + auto b1 = unknown_kw{2}; + auto c1 = ::unknown_kw{3}; + auto d1 = (int) unknown_kw{4}; + auto e1 = (int) ::unknown_kw{5}; + auto f1 = static_cast<int>(unknown_kw{6}); + auto g1 = static_cast<int>(::unknown_kw{7}); + + + + auto a2 = int + + {1}; + auto b2 = unknown_kw + + {2}; + auto c2 = ::unknown_kw + + {3}; + auto d2 = (int) unknown_kw + + {4}; + auto e2 = (int) ::unknown_kw + + {5}; + auto f2 = static_cast<int>(unknown_kw + + {6}); + auto g2 = static_cast<int>(::unknown_kw + + {7}); + + + + auto a1 = int{ + + 1 + + }; + auto b1 = unknown_kw{ + + 2 + + }; + auto c1 = ::unknown_kw { + + 3 + + }; + auto d1 = (int) unknown_kw { + + 4 + + }; + auto e1 = (int) ::unknown_kw { + + 5 + + }; + auto f1 = static_cast<int>(unknown_kw { + + 6 + + }); + auto g1 = static_cast<int>(::unknown_kw { + + 7 + + }); + + return 1; +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34165-type_brace_init_lst.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34165-type_brace_init_lst.cpp new file mode 100644 index 00000000..92fc0b0b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34165-type_brace_init_lst.cpp @@ -0,0 +1,87 @@ +// Uncrustify does not process the intention of an using alias, +// unknown_kw will therefore no be parsed as known keyword +using unknown_kw = int; + +int main() +{ + // 'int' is a known c++ keyword + auto a0 = int { 1 }; + auto b0 = unknown_kw { 2 }; + auto c0 = ::unknown_kw { 3 }; + auto d0 = (int) unknown_kw { 4 }; + auto e0 = (int) ::unknown_kw { 5 }; + auto f0 = static_cast<int>(unknown_kw { 6 }); + auto g0 = static_cast<int>(::unknown_kw { 7 }); + + auto a1 = int{1 }; + auto b1 = unknown_kw{2 }; + auto c1 = ::unknown_kw{3 }; + auto d1 = (int) unknown_kw{4 }; + auto e1 = (int) ::unknown_kw{5 }; + auto f1 = static_cast<int>(unknown_kw{6 }); + auto g1 = static_cast<int>(::unknown_kw{7 }); + + + + auto a2 = int + + {1 }; + auto b2 = unknown_kw + + {2 }; + auto c2 = ::unknown_kw + + {3 }; + auto d2 = (int) unknown_kw + + {4 }; + auto e2 = (int) ::unknown_kw + + {5 }; + auto f2 = static_cast<int>(unknown_kw + + {6 }); + auto g2 = static_cast<int>(::unknown_kw + + {7 }); + + + + auto a1 = int{ + + 1 + + }; + auto b1 = unknown_kw{ + + 2 + + }; + auto c1 = ::unknown_kw { + + 3 + + }; + auto d1 = (int) unknown_kw { + + 4 + + }; + auto e1 = (int) ::unknown_kw { + + 5 + + }; + auto f1 = static_cast<int>(unknown_kw { + + 6 + + }); + auto g1 = static_cast<int>(::unknown_kw { + + 7 + + }); + + return 1; +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34166-type_brace_init_lst.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34166-type_brace_init_lst.cpp new file mode 100644 index 00000000..d7dfa908 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34166-type_brace_init_lst.cpp @@ -0,0 +1,87 @@ +// Uncrustify does not process the intention of an using alias, +// unknown_kw will therefore no be parsed as known keyword +using unknown_kw = int; + +int main() +{ + // 'int' is a known c++ keyword + auto a0 = int { 1}; + auto b0 = unknown_kw { 2}; + auto c0 = ::unknown_kw { 3}; + auto d0 = (int) unknown_kw { 4}; + auto e0 = (int) ::unknown_kw { 5}; + auto f0 = static_cast<int>(unknown_kw { 6}); + auto g0 = static_cast<int>(::unknown_kw { 7}); + + auto a1 = int{1}; + auto b1 = unknown_kw{2}; + auto c1 = ::unknown_kw{3}; + auto d1 = (int) unknown_kw{4}; + auto e1 = (int) ::unknown_kw{5}; + auto f1 = static_cast<int>(unknown_kw{6}); + auto g1 = static_cast<int>(::unknown_kw{7}); + + + + auto a2 = int + + {1}; + auto b2 = unknown_kw + + {2}; + auto c2 = ::unknown_kw + + {3}; + auto d2 = (int) unknown_kw + + {4}; + auto e2 = (int) ::unknown_kw + + {5}; + auto f2 = static_cast<int>(unknown_kw + + {6}); + auto g2 = static_cast<int>(::unknown_kw + + {7}); + + + + auto a1 = int{ + + 1 + + }; + auto b1 = unknown_kw{ + + 2 + + }; + auto c1 = ::unknown_kw { + + 3 + + }; + auto d1 = (int) unknown_kw { + + 4 + + }; + auto e1 = (int) ::unknown_kw { + + 5 + + }; + auto f1 = static_cast<int>(unknown_kw { + + 6 + + }); + auto g1 = static_cast<int>(::unknown_kw { + + 7 + + }); + + return 1; +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34168-Issue_2910.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34168-Issue_2910.cpp new file mode 100644 index 00000000..82c2bec9 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34168-Issue_2910.cpp @@ -0,0 +1,4 @@ +auto foo() -> decltype(0) +{ + return 0; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34169-init-list-call.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34169-init-list-call.cpp new file mode 100644 index 00000000..95449eb1 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34169-init-list-call.cpp @@ -0,0 +1 @@ +auto x = foo{0}( ); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34170-i1082.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34170-i1082.cpp new file mode 100644 index 00000000..06680c0e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34170-i1082.cpp @@ -0,0 +1,4 @@ +// there should be no break ups caused by suffix or separator +auto n2 = 1'000; +auto m1 = 0b0010'1010LL; +auto m2 = 0xfa'afUll;
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34171-i1181.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34171-i1181.cpp new file mode 100644 index 00000000..1a959d34 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34171-i1181.cpp @@ -0,0 +1,6 @@ +int main() +{ + if(true) {return 1;} + else if(true) {return 1;} + else {return 1;} +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34172-i1165.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34172-i1165.cpp new file mode 100644 index 00000000..c3123b59 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34172-i1165.cpp @@ -0,0 +1,14 @@ +#include <functional> + +int main() +{ + typedef std::function<void ()> C; + C callback = + [] () + { + C f([]() + { + int i; + }); + }; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34173-i1464.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34173-i1464.cpp new file mode 100644 index 00000000..179ecd5e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34173-i1464.cpp @@ -0,0 +1,3 @@ +auto p = std::make_pair(r * cos(a), r * sin(a)); + +auto p2 = std::make_pari(r * 0x0000'1111, 0x0000'1111 * r); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34174-i1466.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34174-i1466.cpp new file mode 100644 index 00000000..fe704d2a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34174-i1466.cpp @@ -0,0 +1,6 @@ +A a = {this->r * cos(b)};
+
+B b1 = {0x0000'1111 * this->r};
+B b3 = {this->r * 0x0000'1111};
+B b2 = {0x0000'1111 * value};
+B b4 = {value * 0x0000'1111};
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34175-i1509.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34175-i1509.cpp new file mode 100644 index 00000000..419807fd --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34175-i1509.cpp @@ -0,0 +1,5 @@ +void f() +{ + int i = A::B::C::bar(); + int ii = A::B::C::bar(); +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34176-i1509_bug_1112_correction.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34176-i1509_bug_1112_correction.cpp new file mode 100644 index 00000000..b9a75cf6 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34176-i1509_bug_1112_correction.cpp @@ -0,0 +1,26 @@ +void f() +{ + int i = A::B::C::bar(); + int ii = A::B::C::bar(); +} + +int A::foo() +{ + return 1; +} +int A::B::foo() +{ + return A::foo(); +} +int A::B::C::foo() +{ + return A::B::foo(); +} +int A::B::C::D::foo() +{ + return A::B::C::foo(); +} +int A::B::C::D::E::foo() +{ + return A::B::C::D::foo(); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34177-sp_func_call_paren.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34177-sp_func_call_paren.cpp new file mode 100644 index 00000000..580e9bae --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34177-sp_func_call_paren.cpp @@ -0,0 +1,11 @@ +BEGIN_MESSAGE_MAP (CUSB2_camera_developementDlg, CDialog) + ON_COMMAND (IDC_ESCAPE, On_Escape) + ON_COMMAND (IDC_8_BIT, On_8_Bit) + ON_COMMAND (IDC_14_BIT, On_14_Bit) + ON_COMMAND (IDC_ACQUIRE, On_Acquire) + ON_COMMAND (IDC_SAVE_COLUMN_AVERAGES, On_Save_Column_Averages) + ON_COMMAND (IDC_SAVE_ROW_AVERAGES, On_Save_Row_Averages) + ON_WM_PAINT () + ON_WM_QUERYDRAGICON () + ON_WM_CTLCOLOR () +END_MESSAGE_MAP () diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34178-Issue_3237.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34178-Issue_3237.cpp new file mode 100644 index 00000000..23b565a9 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34178-Issue_3237.cpp @@ -0,0 +1,4 @@ +void f() +{ + CPoint pt( aaa * bbb ); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34179-arith_vs_byref.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34179-arith_vs_byref.cpp new file mode 100644 index 00000000..f459fdcc --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34179-arith_vs_byref.cpp @@ -0,0 +1,10 @@ +A a = {this->r & cos(b)};
+
+B b1 = {0x0000'1111 & this->r};
+B b2 = {this->r & 0x0000'1111};
+B b3 = {0x0000'1111 & value};
+B b4 = {value & 0x0000'1111};
+
+auto p = std::make_pair(r & cos(a), r & sin(a));
+
+auto p2 = std::make_pair(r & 0x0000'1111, 0x0000'1111 & r);
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34180-bug_1402.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34180-bug_1402.cpp new file mode 100644 index 00000000..09714c41 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34180-bug_1402.cpp @@ -0,0 +1,12 @@ +namespace Constants +{ +double PI = 3.14; +} +int factor = 41; +double result = Constants::PI * factor; + +return Constants::PI * factor; + +void func(int value) { + return SomeClass(value, Constants::PI * value); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34190-bug_1003.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34190-bug_1003.cpp new file mode 100644 index 00000000..7495b93d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34190-bug_1003.cpp @@ -0,0 +1,33 @@ +class Foo +{ +public: + Foo( + int x_, + int y_ + ) : x(x_), y(y_) + { + } +private: + int x; + int y; +}; + +class Bar +{ +public: + // Splits 3,5 onto newlines + Bar() : Bar(3, 5) + { + } + + // No split here + Bar( + int x, + int y + ) : foo(x, y) + { + } + + Foo foo; +}; + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34191-comment-align-multiline.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34191-comment-align-multiline.cpp new file mode 100644 index 00000000..db501481 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34191-comment-align-multiline.cpp @@ -0,0 +1,13 @@ +#include <stdio.h> + +void function() +{ + printf( "Hello World\n" ); + /* + output_comment_multi_simple to test replacement of \r\n to \n keep the + following \r: + //test + /// Another comment + //end test + */ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34192-i1207.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34192-i1207.cpp new file mode 100644 index 00000000..e02da8c9 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34192-i1207.cpp @@ -0,0 +1,10 @@ +#include <vector> +std::vector<int> f() +{ + return std::vector<int>{1}; +} + +int main() +{ + return f()[0]; +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34193-i1218.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34193-i1218.cpp new file mode 100644 index 00000000..d4d05106 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34193-i1218.cpp @@ -0,0 +1,8 @@ +// Do not add a new line because of the vbrace close that is above col 25 +// after return 1; +int main() +{ + if(1) + return 1; + return 0; +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34194-sp_arith_additive.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34194-sp_arith_additive.cpp new file mode 100644 index 00000000..5ecb2ec8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34194-sp_arith_additive.cpp @@ -0,0 +1,2 @@ +int i = 0 + 3 - 4*3%3; +int ii = 0 + 3 - 4*3%3;
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34195-sp_arith_additive.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34195-sp_arith_additive.cpp new file mode 100644 index 00000000..f419a3ed --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34195-sp_arith_additive.cpp @@ -0,0 +1,2 @@ +int i = 0+3-4 * 3 % 3; +int ii = 0+3-4 * 3 % 3;
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34196-Issue_1460.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34196-Issue_1460.h new file mode 100644 index 00000000..63787999 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34196-Issue_1460.h @@ -0,0 +1,5 @@ +#define MGT_TYPE_WINDOW (mgt_window_get_type ()) + +G_DECLARE_FINAL_TYPE (MgtWindow, mgt_window, MGT, WINDOW, GtkApplicationWindow) + +MgtWindow *mgt_window_new (MgtApplication *app); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34197-bug_1161.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34197-bug_1161.cpp new file mode 100644 index 00000000..34740f5a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34197-bug_1161.cpp @@ -0,0 +1,56 @@ +// Use case from issue #1161 +class test +{ + // comment 1 (gets methods) + public: + // get 1 + int get1(); + // get 2 + int get2(); + + + + + // comment 2 (sets methods) + public: + // set 1 + int set1(); + // set2 + int set2(); + +}; + +// Use cases from issue #2704 +class Foo +{ + public: + /// @name Constructors + /// @{ + + Foo(int value) : value_(value) + { + } + + /// @} + + private: + int value_; +}; + +class Bar +{ + public: + /*! + * @name Constructors + * @{ + */ + + Bar(int value) : value_(value) + { + } + + /*! @} */ + + private: + int value_; +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34198-bug_1249.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34198-bug_1249.cpp new file mode 100644 index 00000000..65637efe --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34198-bug_1249.cpp @@ -0,0 +1,11 @@ +friend class ::GameObject; +void GameObject::Foo(); + +auto x = ::GlobalFunc(); + +friend void ::testing::PrintDebugInformationForFakesInUse(); + +template<class TransferFunction> +void ::DateTime::Transfer(TransferFunction & transfer) +{ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34199-not_lambda.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34199-not_lambda.cpp new file mode 100644 index 00000000..a9c65439 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34199-not_lambda.cpp @@ -0,0 +1,8 @@ +int ff() +{ + // not a lambda fcn so don't surround "->" by spaces + f()[0]->size(); + if(true) { + return 1; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34200-i1536.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34200-i1536.cpp new file mode 100644 index 00000000..0eb7fc69 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34200-i1536.cpp @@ -0,0 +1,9 @@ +// FuncA +void FuncA(void) +{ +} + +// FuncB +void FuncB(void) +{ +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34201-i1565.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34201-i1565.cpp new file mode 100644 index 00000000..c787f163 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34201-i1565.cpp @@ -0,0 +1,9 @@ +namespace ns1 { +namespace ns2 { + + #define SOME_MACRO() \ + if(true) { \ + } + +} // namespace ns2 +} // namespace ns1
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34202-i1617.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34202-i1617.cpp new file mode 100644 index 00000000..98ede13b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34202-i1617.cpp @@ -0,0 +1,5 @@ +namespace +{ +void f(){ +}; +} // namespace
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34203-i1516.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34203-i1516.cpp new file mode 100644 index 00000000..d0612a2b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34203-i1516.cpp @@ -0,0 +1,23 @@ +void myClass::foo() { + int bar; + std::string str; + + + DbConfig::configuredDatabase()->apply(db); + + std::string str2; + + std::string str2; + + + f(); + DbConfig::configuredDatabase()->apply(db); + + int bar; + std::string str; + + std::string str2; + + + f(); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34204-func_param_indent_leading_comma.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34204-func_param_indent_leading_comma.cpp new file mode 100644 index 00000000..e8790dbd --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34204-func_param_indent_leading_comma.cpp @@ -0,0 +1,7 @@ +uint32_t foo ( uint8_t param1 + , some_datatype param2 + , datatype param3 + , another_datatype *param4 + , uint16_t param5 + , uint32_t * param6 + );
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34205-bug_1395.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34205-bug_1395.cpp new file mode 100644 index 00000000..16e2fbba --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34205-bug_1395.cpp @@ -0,0 +1,5 @@ +Type tmp = call_function(getObj().x, + getObj().y, + getObj().z, + getObj().w); +getObj().result = tmp; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34206-for_loop_head.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34206-for_loop_head.cpp new file mode 100644 index 00000000..6cea550d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34206-for_loop_head.cpp @@ -0,0 +1,10 @@ +for(int i = 1, + j = 2, + k = 3, + ; (i != 1 + && j != 2 + && k != 2) + ; i++, j++, k++ ) +{ +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34207-for_loop_head.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34207-for_loop_head.cpp new file mode 100644 index 00000000..2aa9bdc0 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34207-for_loop_head.cpp @@ -0,0 +1,10 @@ +for( int i = 1, + j = 2, + k = 3, + ; (i != 1 + && j != 2 + && k != 2) + ; i++, j++, k++ ) +{ +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34208-conversion_operator.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34208-conversion_operator.cpp new file mode 100644 index 00000000..27b52dac --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34208-conversion_operator.cpp @@ -0,0 +1,5 @@ +template< class T > +operator T*() const +{ + return 0; +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34209-lambda_selfcalling.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34209-lambda_selfcalling.cpp new file mode 100644 index 00000000..8f0c819e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34209-lambda_selfcalling.cpp @@ -0,0 +1,10 @@ +void f(){ + int i = 0; + const auto j = [](int k){ + return k+2; + } (i); + + const auto l = ([](int k){ + return k+2; + }) (i); +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34210-override_virtual.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34210-override_virtual.cpp new file mode 100644 index 00000000..537454b1 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34210-override_virtual.cpp @@ -0,0 +1,16 @@ +struct A +{ + virtual void foo(); + virtual void bar() = 0; + virtual void baz() const { + } +}; + +struct B : public A +{ + virtual void foo() override; + void bar() override { + } + void baz() const override { + } +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34211-anonymous_enum.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34211-anonymous_enum.cpp new file mode 100644 index 00000000..ef237a6e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34211-anonymous_enum.cpp @@ -0,0 +1,37 @@ +enum { + E11 = 0, + E12 = 1, + E13 = 2 +}; + +enum Enum1 { + E21 = 0, + E22 = 1, + E23 = 2 +}; + +enum Enum2 : int { + E31 = 0, + E32 = 1, + E33 = 2 +}; + +enum Enum3 +: int { + E41 = 0, + E42 = 1, + E43 = 2 +}; + +enum : int { + E51 = 0, + E52 = 1, + E53 = 2 +}; + +enum +: int { + E61 = 0, + E62 = 1, + E63 = 2 +};
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34212-func_class.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34212-func_class.h new file mode 100644 index 00000000..2035b634 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34212-func_class.h @@ -0,0 +1,16 @@ +void MD5::reverse_u32(UINT8 *buf, int n_u32); + +MD5::MD5(); + +class AlignStack +{ +public: +bool m_skip_first; + +AlignStack(); + + +~AlignStack(); + +void End(); +}; // class AlignStack diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34250-bug_1607.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34250-bug_1607.cpp new file mode 100644 index 00000000..9e4e47d3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34250-bug_1607.cpp @@ -0,0 +1,2 @@ +decltype(i * d) prod = i * d; +decltype(i + d) sum; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34251-bug_1649.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34251-bug_1649.cpp new file mode 100644 index 00000000..4b352c79 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34251-bug_1649.cpp @@ -0,0 +1,3 @@ +Foo() +noexcept() +{} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34252-issue_2001.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34252-issue_2001.cpp new file mode 100644 index 00000000..39b9446d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34252-issue_2001.cpp @@ -0,0 +1,2 @@ +extern int foo(); +extern int foo(size_t); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34253-friends.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34253-friends.cpp new file mode 100644 index 00000000..58fd649a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34253-friends.cpp @@ -0,0 +1,8 @@ +class foo +{ +friend void bar(); +friend void none(); +template <typename T> friend vector<T> vec(); + + +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34254-issue_1985.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34254-issue_1985.cpp new file mode 100644 index 00000000..ef9fc90a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34254-issue_1985.cpp @@ -0,0 +1,62 @@ +// Don't break a prototype followed by a one-liner +class foo1 +{ +foo1(); +foo1(int) {} + + +int bar(); +int bar(int) { return 0; } + + +foo1(long); +foo1(short) {} + + +int x; +}; + +// Don't break a one-liner followed by a prototype +class foo2 +{ +foo2(int) {} +foo2(); + + +int bar(int) { return 0; } +int bar(); + + +foo2(short) {} +foo2(long); + + +int x; +}; + +// Do break a prototype followed by a multi-line definition +class foo3 +{ +foo3(); + + +foo3(int) +{ + x = 0; +} +int bar(); + + +int bar(int) +{ + return 0; +} +foo3(long); + + +foo3(short) +{ + x = 0; +} +int x; +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34255-eat_blanks_after_codewidth.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34255-eat_blanks_after_codewidth.cpp new file mode 100644 index 00000000..7005d86c --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34255-eat_blanks_after_codewidth.cpp @@ -0,0 +1,15 @@ +class A
+{
+ void
+ func1()
+ {
+ // comment
+ }
+
+ void
+ func2()
+ {
+ auto result = 1 + 2 +
+ 3 + 4;
+ }
+};
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34256-Issue_2836.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34256-Issue_2836.cpp new file mode 100644 index 00000000..4d2a648f --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34256-Issue_2836.cpp @@ -0,0 +1,4 @@ +module x; +static if (1) {{ + int x; + }} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34257-brace_init_stdint_macros.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34257-brace_init_stdint_macros.cpp new file mode 100644 index 00000000..976eb454 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34257-brace_init_stdint_macros.cpp @@ -0,0 +1,11 @@ +#include <stdint.h> + +uint64_t values[12] = { + UINT64_C(1486918591), UINT64_C(28100), ~UINT64_C(4), + UINT64_C(0x2700f184), UINT64_C(0x69b88dcc4d7e98eb), + UINT64_C(0x0ab8e2a231b49732), + UINT64_C(0x8226beae36e7317e), UINT64_C(0x5739289992c21658), + UINT64_C(0x3acce043), ~UINT64_C(8), UINT64_C(4022), + UINT64_C(63365009), +}; + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34280-UNI-29935.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34280-UNI-29935.cpp new file mode 100644 index 00000000..28d0b66d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34280-UNI-29935.cpp @@ -0,0 +1,6 @@ +void Foo1(BarType & x, void BarFunc()); + +void Bar() +{ + void BarFunc2(BarType & x); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34290-brace_brace_init_lst.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34290-brace_brace_init_lst.cpp new file mode 100644 index 00000000..19c4b962 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34290-brace_brace_init_lst.cpp @@ -0,0 +1,22 @@ +int main() +{ + int a0[][] = { { 1 } }; + unknown_type b0 = { { 2 } }; + auto c0 = unknown_type { { 3 } }; + auto d0 = func( { { 3 } } ); + auto e0 = func( unknown_type { { 3 } } ); + + int a1[][] = { {1} }; + unknown_type b1 = { {2} }; + auto c1 = unknown_type { {3} }; + auto d1 = func({ {3} }); + auto e1 = func(unknown_type { {3} }); + + int a2[][] = { {1} }; + unknown_type b2 = { {2} }; + auto c2 = unknown_type { {3} }; + auto d2 = func({ {3} }); + auto e2 = func(unknown_type { {3} }); + + return 1; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34291-brace_brace_init_lst.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34291-brace_brace_init_lst.cpp new file mode 100644 index 00000000..aed91c1b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34291-brace_brace_init_lst.cpp @@ -0,0 +1,22 @@ +int main() +{ + int a0[][] = { { 1 } }; + unknown_type b0 = { { 2 } }; + auto c0 = unknown_type{ { 3 } }; + auto d0 = func( { { 3 } } ); + auto e0 = func( unknown_type{ { 3 } } ); + + int a1[][] = { {1} }; + unknown_type b1 = { {2} }; + auto c1 = unknown_type{ {3} }; + auto d1 = func({ {3} }); + auto e1 = func(unknown_type{ {3} }); + + int a2[][] = { {1} }; + unknown_type b2 = { {2} }; + auto c2 = unknown_type{ {3} }; + auto d2 = func({ {3} }); + auto e2 = func(unknown_type{ {3} }); + + return 1; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34292-brace_brace_init_lst.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34292-brace_brace_init_lst.cpp new file mode 100644 index 00000000..cc0ac847 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34292-brace_brace_init_lst.cpp @@ -0,0 +1,22 @@ +int main() +{ + int a0[][] = { { 1 } }; + unknown_type b0 = { { 2 } }; + auto c0 = unknown_type { { 3 } }; + auto d0 = func( { { 3 } } ); + auto e0 = func( unknown_type { { 3 } } ); + + int a1[][] = { { 1 } }; + unknown_type b1 = { { 2 } }; + auto c1 = unknown_type{ { 3 } }; + auto d1 = func({ { 3 } }); + auto e1 = func(unknown_type{ { 3 } }); + + int a2[][] = { { 1 } }; + unknown_type b2 = { { 2 } }; + auto c2 = unknown_type{ { 3 } }; + auto d2 = func({ { 3 } }); + auto e2 = func(unknown_type{ { 3 } }); + + return 1; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34293-brace_brace_init_lst.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34293-brace_brace_init_lst.cpp new file mode 100644 index 00000000..c47119ab --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34293-brace_brace_init_lst.cpp @@ -0,0 +1,22 @@ +int main() +{ + int a0[][] = {{1}}; + unknown_type b0 = {{2}}; + auto c0 = unknown_type {{3}}; + auto d0 = func( {{3}} ); + auto e0 = func( unknown_type {{3}} ); + + int a1[][] = {{1}}; + unknown_type b1 = {{2}}; + auto c1 = unknown_type{{3}}; + auto d1 = func({{3}}); + auto e1 = func(unknown_type{{3}}); + + int a2[][] = {{1}}; + unknown_type b2 = {{2}}; + auto c2 = unknown_type{{3}}; + auto d2 = func({{3}}); + auto e2 = func(unknown_type{{3}}); + + return 1; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34294-brace_brace_init_lst.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34294-brace_brace_init_lst.cpp new file mode 100644 index 00000000..afe3a0ec --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34294-brace_brace_init_lst.cpp @@ -0,0 +1,22 @@ +int main() +{ + int a0[][] = { { 1 } }; + unknown_type b0 = { { 2 } }; + auto c0 = unknown_type { { 3 } }; + auto d0 = func( { { 3 } } ); + auto e0 = func( unknown_type { { 3 } } ); + + int a1[][] = { { 1} }; + unknown_type b1 = { { 2} }; + auto c1 = unknown_type{ { 3} }; + auto d1 = func({ { 3} }); + auto e1 = func(unknown_type{ { 3} }); + + int a2[][] = { { 1} }; + unknown_type b2 = { { 2} }; + auto c2 = unknown_type{ { 3} }; + auto d2 = func({ { 3} }); + auto e2 = func(unknown_type{ { 3} }); + + return 1; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34295-brace_brace_init_lst.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34295-brace_brace_init_lst.cpp new file mode 100644 index 00000000..9b8ea3c5 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34295-brace_brace_init_lst.cpp @@ -0,0 +1,22 @@ +int main() +{ + int a0[][] = {{1 } }; + unknown_type b0 = {{2 } }; + auto c0 = unknown_type {{3 } }; + auto d0 = func( {{3 } } ); + auto e0 = func( unknown_type {{3 } } ); + + int a1[][] = {{1} }; + unknown_type b1 = {{2} }; + auto c1 = unknown_type{{3} }; + auto d1 = func({{3} }); + auto e1 = func(unknown_type{{3} }); + + int a2[][] = {{1} }; + unknown_type b2 = {{2} }; + auto c2 = unknown_type{{3} }; + auto d2 = func({{3} }); + auto e2 = func(unknown_type{{3} }); + + return 1; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34296-i1768.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34296-i1768.cpp new file mode 100644 index 00000000..94327d9c --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34296-i1768.cpp @@ -0,0 +1,7 @@ +void f( + int a, int b); + +void g() +{ + f(1, 2); +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34297-align-assign-mixed.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34297-align-assign-mixed.cpp new file mode 100644 index 00000000..d8082600 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34297-align-assign-mixed.cpp @@ -0,0 +1,11 @@ +class X16 +{ +X16() = delete; +public: +void z(int x = 0); +virtual void f(int x, int y) = 0; +int hhi = 9; +void g(int x = 0); +int i = 9; +void x(int ggs = 0); +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34298-align-assign-mixed.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34298-align-assign-mixed.cpp new file mode 100644 index 00000000..4f8dadde --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34298-align-assign-mixed.cpp @@ -0,0 +1,11 @@ +class X16 +{ +X16() = delete; +public: +void z(int x = 0); +virtual void f(int x, int y) = 0; +int hhi = 9; +void g(int x = 0); +int i = 9; +void x(int ggs = 0); +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34299-align-assign-mixed.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34299-align-assign-mixed.cpp new file mode 100644 index 00000000..ddae789b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34299-align-assign-mixed.cpp @@ -0,0 +1,11 @@ +class X16 +{ +X16() = delete; +public: +void z(int x = 0); +virtual void f(int x, int y) = 0; +int hhi = 9; +void g(int x = 0); +int i = 9; +void x(int ggs = 0); +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34300-bug_1236.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34300-bug_1236.cpp new file mode 100644 index 00000000..8acaaed2 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34300-bug_1236.cpp @@ -0,0 +1,14 @@ +void foo() +{ + int head, bar; + __asm__ __volatile__ + ( + "movq %0,%%xmm0\n\t" /* asm template */ + "0:\n\t" + "bar\t%0, [%4]\n\t" // in template + "1:\n\t" + : "=a", (bar) + : "=&b", (&head), "+m", (bar) + : "cc" + ); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34301-nl_fdef_brace_cond-f.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34301-nl_fdef_brace_cond-f.cpp new file mode 100644 index 00000000..05aaf7c8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34301-nl_fdef_brace_cond-f.cpp @@ -0,0 +1,30 @@ +void f() +{ +} +void f() +{ +} + +void f()const +{ +} +void f()const +{ +} + +void f()noexcept() +{ +} +void f()noexcept() +{ +} + +void f()/**/ +{ +} +void f()/**/ +{ +} +void f()// +{ +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34302-nl_fdef_brace_cond-r.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34302-nl_fdef_brace_cond-r.cpp new file mode 100644 index 00000000..8a35c775 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34302-nl_fdef_brace_cond-r.cpp @@ -0,0 +1,21 @@ +void f(){ +} +void f(){ +} + +void f()const { +} +void f()const { +} + +void f()noexcept(){ +} +void f()noexcept(){ +} + +void f() {/**/ +} +void f(){/**/ +} +void f(){// +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34303-nl_fdef_brace_cond-fr.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34303-nl_fdef_brace_cond-fr.cpp new file mode 100644 index 00000000..e498a669 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34303-nl_fdef_brace_cond-fr.cpp @@ -0,0 +1,25 @@ +void f(){ +} +void f(){ +} + +void f()const +{ +} +void f()const +{ +} + +void f()noexcept() +{ +} +void f()noexcept() +{ +} + +void f() {/**/ +} +void f(){/**/ +} +void f(){// +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34304-nl_fdef_brace_cond-rf.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34304-nl_fdef_brace_cond-rf.cpp new file mode 100644 index 00000000..078e070a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34304-nl_fdef_brace_cond-rf.cpp @@ -0,0 +1,26 @@ +void f() +{ +} +void f() +{ +} + +void f()const { +} +void f()const { +} + +void f()noexcept(){ +} +void f()noexcept(){ +} + +void f()/**/ +{ +} +void f()/**/ +{ +} +void f()// +{ +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34305-issue_2124-1.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34305-issue_2124-1.cpp new file mode 100644 index 00000000..bad0ea55 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34305-issue_2124-1.cpp @@ -0,0 +1,48 @@ +if(x) [[likely]] {} +if(x) +[[unlikely]] +{} + +g(); + +if(x) [[likely]] l(); +if(x) +[[unlikely]] + l(); + +g(); + +if(x) +[[unlikely]] + l1(); +else + l2(); + +g(); + +if(x) +#if __has_cpp_attribute(likely) +[[likely]] +#endif + return false; +else + return true; + +g(); + +while(true) [[likely]] {break;} +while(true) +[[unlikely]] +{break;} + +g(); + +if(x) +[[likely]] +{ + if(y) + [[likely]] + {} +} + +g();
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34306-issue_2124-2.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34306-issue_2124-2.cpp new file mode 100644 index 00000000..bad0ea55 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34306-issue_2124-2.cpp @@ -0,0 +1,48 @@ +if(x) [[likely]] {} +if(x) +[[unlikely]] +{} + +g(); + +if(x) [[likely]] l(); +if(x) +[[unlikely]] + l(); + +g(); + +if(x) +[[unlikely]] + l1(); +else + l2(); + +g(); + +if(x) +#if __has_cpp_attribute(likely) +[[likely]] +#endif + return false; +else + return true; + +g(); + +while(true) [[likely]] {break;} +while(true) +[[unlikely]] +{break;} + +g(); + +if(x) +[[likely]] +{ + if(y) + [[likely]] + {} +} + +g();
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34307-2203.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34307-2203.cpp new file mode 100644 index 00000000..70a1f31a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34307-2203.cpp @@ -0,0 +1 @@ +using Foo = std::function<void(const bool)>; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34308-enum_comment_wrap.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34308-enum_comment_wrap.cpp new file mode 100644 index 00000000..736e6718 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34308-enum_comment_wrap.cpp @@ -0,0 +1,7 @@ +enum class Eee +{ + Foo, + AnotherFoo, // comment + Bar, + DifferentBar +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34309-issue_2209-1.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34309-issue_2209-1.cpp new file mode 100644 index 00000000..82ff67c6 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34309-issue_2209-1.cpp @@ -0,0 +1,9 @@ +namespace +{ + +void g(int a1234567890123456, int b1234567890123456, + int c1234567890123456) +{ +} + +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34310-issue_2209-2.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34310-issue_2209-2.cpp new file mode 100644 index 00000000..26c579d3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34310-issue_2209-2.cpp @@ -0,0 +1,11 @@ +namespace +{ + +int f = 0; + +} + +void g(int a1234567890123456, int b1234567890123456, + int c1234567890123456) +{ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34311-Issue_2250.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34311-Issue_2250.cpp new file mode 100644 index 00000000..9268c2e3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34311-Issue_2250.cpp @@ -0,0 +1,9 @@ +SettingsDelta::SettingsDelta( + const LastEffectiveContextData& lastEffCtxData) + : Member2(lastEffCtxData.member2()) + , Member3(lastEffCtxData.member3().c_str()) + , Functor([this](const int& num) { Callback(num); }) + , Member4(lastEffCtxData.member4().c_str()) + , Member5(lastEffCtxData.member5()) +{ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34312-Issue_2101.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34312-Issue_2101.cpp new file mode 100644 index 00000000..3e07c686 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34312-Issue_2101.cpp @@ -0,0 +1,5 @@ +void Test() +{ + aaaaaa = condition ? FunctionWithVeryLongName( andWithVeryLongArgumentsToo1, andWithVeryLongArgumentsToo2 ) + : FunctionWithVeryLongName( andWithVeryLongArgumentsToo2, andWithVeryLongArgumentsToo1 ); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34313-Issue_2437.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34313-Issue_2437.cpp new file mode 100644 index 00000000..77a273ef --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34313-Issue_2437.cpp @@ -0,0 +1,2 @@ +void timer_cb1(struct timer_node *n); +typedef void timer_cb (struct timer_node *n); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34314-Issue_2604.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34314-Issue_2604.cpp new file mode 100644 index 00000000..eb87fc8a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34314-Issue_2604.cpp @@ -0,0 +1,6 @@ +void funcPROTO( int parameter1, int parameter2, int parameter3, int parameter4, int parameter5, int parameter6, int parameter7); + +void funcDEF( int parameter1, int parameter2, int parameter3, int parameter4, int parameter5, int parameter6, int parameter7) +{ + funcCALL( parameter1, parameter2, parameter3, parameter4, parameter5, parameter6, parameter7 ); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34315-align_func_proto_thresh.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34315-align_func_proto_thresh.cpp new file mode 100644 index 00000000..c4f1a119 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34315-align_func_proto_thresh.cpp @@ -0,0 +1,17 @@ +class AlignFuncProtoTest { +public: +void test1(); +void test2(); +SomeLongType findSomeLongType(); +void* test3(); +void test4(){ + a=1; +} +double test5(); +void test6(); +SomeLongNamespace::OtherLongNamespace::SomeLongType findSomeLongType(); +void test7(); +void test8(); +void test9(); +SomeLongNamespace::SomeLongType long_var; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34316-align_func_proto_thresh.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34316-align_func_proto_thresh.cpp new file mode 100644 index 00000000..1bbde49b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34316-align_func_proto_thresh.cpp @@ -0,0 +1,17 @@ +class AlignFuncProtoTest { +public: +void test1(); +void test2(); +SomeLongType findSomeLongType(); +void* test3(); +void test4(){ + a=1; +} +double test5(); +void test6(); +SomeLongNamespace::OtherLongNamespace::SomeLongType findSomeLongType(); +void test7(); +void test8(); +void test9(); +SomeLongNamespace::SomeLongType long_var; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34317-align_func_proto_thresh.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34317-align_func_proto_thresh.cpp new file mode 100644 index 00000000..e0d3488a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34317-align_func_proto_thresh.cpp @@ -0,0 +1,17 @@ +class AlignFuncProtoTest { +public: +void test1(); +void test2(); +SomeLongType findSomeLongType(); +void* test3(); +void test4(){ + a=1; +} +double test5(); +void test6(); +SomeLongNamespace::OtherLongNamespace::SomeLongType findSomeLongType(); +void test7(); +void test8(); +void test9(); +SomeLongNamespace::SomeLongType long_var; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34318-align_assign_func_proto.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34318-align_assign_func_proto.cpp new file mode 100644 index 00000000..1c003058 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34318-align_assign_func_proto.cpp @@ -0,0 +1,7 @@ +const int *ptr const = 0;
+virtual void f1() = 0;
+virtual void f2() = 0;
+virtual void f3() const = 0;
+virtual void f4() const = 0;
+virtual void f5() = 0;
+virtual void f6() = 0;
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34319-align_func_proto_thresh2.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34319-align_func_proto_thresh2.cpp new file mode 100644 index 00000000..8a9df8b4 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34319-align_func_proto_thresh2.cpp @@ -0,0 +1,19 @@ +class AlignFuncProtoTest { +public: +virtual void test1(std::wstring & name, std::pair<Space1::Space2::SomeType, Space1::Space2::otherType> param1) = 0; +virtual SomeLongType findSomeLongType() = 0; +virtual Some::Type test2() = 0; +virtual SomeNameSpace::TypeA test3() = 0; +virtual SomeNameSpace::SubNameSpace1::TypeA test4() = 0; +virtual SomeNameSpace::SubNameSpace1::SubNameSpace2::TypeB test5() = 0; +virtual SomeNameSpace::SubNameSpace1::SubNameSpace2::SubNameSpace3::TypeC test6() = 0; +virtual SomeNameSpace::SubNameSpace1::SubNameSpace2::SubNameSpace3::SubNameSpace4::TypeD test7() = 0; +double test5(); +void test6(); +SomeLongNamespace::OtherLongNamespace::SomeLongType findSomeLongType(); +void test7(); +void test8(); +void test9(); +SomeLongNamespace::SomeLongType long_var; +SomeNameSpace::SubNameSpace1::SubNameSpace2::SubNameSpace3::SubNameSpace4::SubNameSpace5::TypeE test7(); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34320-align_func_proto_thresh2.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34320-align_func_proto_thresh2.cpp new file mode 100644 index 00000000..432a9e3e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34320-align_func_proto_thresh2.cpp @@ -0,0 +1,19 @@ +class AlignFuncProtoTest { +public: +virtual void test1(std::wstring & name, std::pair<Space1::Space2::SomeType, Space1::Space2::otherType> param1) = 0; +virtual SomeLongType findSomeLongType() = 0; +virtual Some::Type test2() = 0; +virtual SomeNameSpace::TypeA test3() = 0; +virtual SomeNameSpace::SubNameSpace1::TypeA test4() = 0; +virtual SomeNameSpace::SubNameSpace1::SubNameSpace2::TypeB test5() = 0; +virtual SomeNameSpace::SubNameSpace1::SubNameSpace2::SubNameSpace3::TypeC test6() = 0; +virtual SomeNameSpace::SubNameSpace1::SubNameSpace2::SubNameSpace3::SubNameSpace4::TypeD test7() = 0; +double test5(); +void test6(); +SomeLongNamespace::OtherLongNamespace::SomeLongType findSomeLongType(); +void test7(); +void test8(); +void test9(); +SomeLongNamespace::SomeLongType long_var; +SomeNameSpace::SubNameSpace1::SubNameSpace2::SubNameSpace3::SubNameSpace4::SubNameSpace5::TypeE test7(); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34321-bug_2285.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34321-bug_2285.cpp new file mode 100644 index 00000000..a456e9be --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34321-bug_2285.cpp @@ -0,0 +1,13 @@ +class __attribute__ ((visibility ("default"))) Test +{ +public: +Test() : + member1(), + member2() +{ +} + +private: +int member1; +int member2; +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34322-issue_2623.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34322-issue_2623.cpp new file mode 100644 index 00000000..a9566447 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34322-issue_2623.cpp @@ -0,0 +1,30 @@ +void child() { + static_cast<id<Mountable>> ( object); +} + +assert(x<0 && y>=3); +assert(y <0&&z> 2); +assert(a>>1); + +std::unique_ptr<Interface<T>> GetProjectionAdapter(const std::string& model_name); + +auto c = a< b>>c; +auto c = a << b >>c; + +if (Something<a> == c) { +} + +if (id<Something<a>> == c) { +} + +const std::vector<Eigen::Matrix<T, A, B>> & P_c; + +const unsigned int wl = w>> lvl; + +using Poly = Model<P, Poly<Dx,Dy, Dz>>; + +void Compute( + Image<E::Matrix<SType, Dim,Int>> const& src, + Image<E::Matrix<TType,Dim, std::string>>& dst); + +Opt<std::vector <std::unordered_set<FrameId>>> partition; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34323-issue_2623.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34323-issue_2623.cpp new file mode 100644 index 00000000..72fd90e8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34323-issue_2623.cpp @@ -0,0 +1,30 @@ +void child() { + static_cast< id< Mountable > > ( object); +} + +assert(x<0 && y>=3); +assert(y <0&&z> 2); +assert(a>>1); + +std::unique_ptr< Interface< T > > GetProjectionAdapter(const std::string& model_name); + +auto c = a< b>>c; +auto c = a << b >>c; + +if (Something< a > == c) { +} + +if (id< Something< a > > == c) { +} + +const std::vector< Eigen::Matrix< T, A, B > > & P_c; + +const unsigned int wl = w>> lvl; + +using Poly = Model< P, Poly< Dx,Dy, Dz > >; + +void Compute( + Image< E::Matrix< SType, Dim,Int > > const& src, + Image< E::Matrix< TType,Dim, std::string > >& dst); + +Opt< std::vector < std::unordered_set< FrameId > > > partition; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34324-issue_2623.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34324-issue_2623.cpp new file mode 100644 index 00000000..61961fa1 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34324-issue_2623.cpp @@ -0,0 +1,30 @@ +void child() { + static_cast< id<Mountable >> ( object); +} + +assert(x<0 && y>=3); +assert(y <0&&z> 2); +assert(a>>1); + +std::unique_ptr<Interface< T >> GetProjectionAdapter(const std::string& model_name); + +auto c = a< b>>c; +auto c = a << b >>c; + +if (Something<a> == c) { +} + +if (id< Something<a >> == c) { +} + +const std::vector< Eigen::Matrix<T, A, B >> & P_c; + +const unsigned int wl = w>> lvl; + +using Poly = Model<P, Poly<Dx,Dy, Dz>>; + +void Compute( + Image<E::Matrix< SType, Dim,Int >> const& src, + Image< E::Matrix< TType,Dim, std::string> >& dst); + +Opt<std::vector < std::unordered_set<FrameId> >> partition; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34325-Issue_3025.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34325-Issue_3025.cpp new file mode 100644 index 00000000..9e64526e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34325-Issue_3025.cpp @@ -0,0 +1,2 @@ +int a;// Рука +int d;/* Рука */ diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34326-Issue_3040.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34326-Issue_3040.cpp new file mode 100644 index 00000000..f9e69333 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34326-Issue_3040.cpp @@ -0,0 +1,70 @@ +int main() +{ + switch (opcode) + { + case 1: + { + return Number(localeCompare(s, a0.toString(exec))); + } + +#ifndef A + case 2: + { + result = String("<big>" + s + "</big>"); + break; + } +#endif + } + + switch (ev->command) + { + case (3): + { + ev->note = *ptrdata; ptrdata++; currentpos++; + ev->vel = *ptrdata; ptrdata++; currentpos++; + if (ev->vel==0) + note[ev->chn][ev->note]=FALSE; + else + note[ev->chn][ev->note]=TRUE; + +#ifdef B + if (ev->chn==6) { + if (ev->vel==0) printfdebug("Note Onf\n"); + else printfdebug("Note On\n"); + }; +#endif + break; + } + + case (4): + { +#ifdef C + if (ev->chn==6) printfdebug("Note Off\n"); +#endif + ev->note = *ptrdata; ptrdata++; currentpos++; + ev->vel = *ptrdata; ptrdata++; currentpos++; + note[ev->chn][ev->note]=FALSE; + + break; + } + + case (5): + { +#ifdef D + if (ev->chn==6) printfdebug ("Key press\n"); +#endif + ev->note = *ptrdata; ptrdata++; currentpos++; + ev->vel = *ptrdata; ptrdata++; currentpos++; + break; + } + +#ifndef E + case 6: + { + result = String("<big>" + s + "</big>"); + break; + } +#endif + } +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34327-Issue_3044.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34327-Issue_3044.cpp new file mode 100644 index 00000000..799fd0a1 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34327-Issue_3044.cpp @@ -0,0 +1,61 @@ +int main() +{ + int af; + int A; + int B; + switch (af) + { + case 1: + { + B = 2; + } + + case 2: + { + return 1; + } + + case 3: + { + A = 1; + break; + } + +#ifdef ALL_THE_CASE + case 4: + { + return 2; + } + +#endif +#ifdef ALL_THE_CASE + case 5: + { + B = 2; + } + +#endif + case (6): + { + B=13; +#ifdef PART_OF_THE_CASE_UNDER + A=1; +#endif + break; + } + + case (7): + { +#ifdef PART_OF_THE_CASE_ABOVE + A=5; +#endif + B=7; + break; + } + + default: + { + B= 50; + } + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34328-Issue_3048.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34328-Issue_3048.cpp new file mode 100644 index 00000000..fb6b0d38 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34328-Issue_3048.cpp @@ -0,0 +1,58 @@ +int main() +{ + int sa_family; + int d; + int scopeid; + switch (sa_family) + { + case 1: + { +#ifdef AF_INET6 + if (d == 1) + { + scopeid = 1; + } + else + { + scopeid = 2; + } + return 5; +#else + return 6; +#endif + } + + case 2: + { +#ifdef AF_INET6 + TQString scopeid("%"); + if (d->addr.generic->sa_family == AF_INET6 && d->addr.in6->sin6_scope_id) + { + scopeid += TQString::number(d->addr.in6->sin6_scope_id); + } + else + { + scopeid.truncate(0); + } + return d->ref.ipAddress().toString() + scopeid; +#endif + } + + case 3: + { +#ifdef AF_INET6 + TQString scopeid("%"); + if (d->addr.generic->sa_family == AF_INET6 && d->addr.in6->sin6_scope_id) + { + scopeid += TQString::number(d->addr.in6->sin6_scope_id); + } + else + { + scopeid.truncate(0); + } + return d->ref.ipAddress().toString() + scopeid; +#endif + } + } +} + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34330-Issue_3061_0nl.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34330-Issue_3061_0nl.cpp new file mode 100644 index 00000000..d46f2655 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34330-Issue_3061_0nl.cpp @@ -0,0 +1,14 @@ +DCOPClient::DCOPClient() +{ + TQObject::connect( + &d->postMessageTimer, TQT_SIGNAL( + timeout()), this, + TQT_SLOT( + processPostedMessagesInternal())); + TQObject::connect( + &d->eventLoopTimer, TQT_SIGNAL( + timeout()), this, TQT_SLOT( + eventLoopTimeout())); +} + +#include <dcopclient.moc>
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34331-Issue_3061_1nl.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34331-Issue_3061_1nl.cpp new file mode 100644 index 00000000..d46f2655 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34331-Issue_3061_1nl.cpp @@ -0,0 +1,14 @@ +DCOPClient::DCOPClient() +{ + TQObject::connect( + &d->postMessageTimer, TQT_SIGNAL( + timeout()), this, + TQT_SLOT( + processPostedMessagesInternal())); + TQObject::connect( + &d->eventLoopTimer, TQT_SIGNAL( + timeout()), this, TQT_SLOT( + eventLoopTimeout())); +} + +#include <dcopclient.moc>
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34332-Issue_3061_2nl.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34332-Issue_3061_2nl.cpp new file mode 100644 index 00000000..d46f2655 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34332-Issue_3061_2nl.cpp @@ -0,0 +1,14 @@ +DCOPClient::DCOPClient() +{ + TQObject::connect( + &d->postMessageTimer, TQT_SIGNAL( + timeout()), this, + TQT_SLOT( + processPostedMessagesInternal())); + TQObject::connect( + &d->eventLoopTimer, TQT_SIGNAL( + timeout()), this, TQT_SLOT( + eventLoopTimeout())); +} + +#include <dcopclient.moc>
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34333-Issue_3061_0nl.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34333-Issue_3061_0nl.cpp new file mode 100644 index 00000000..ef73253e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34333-Issue_3061_0nl.cpp @@ -0,0 +1,14 @@ +DCOPClient::DCOPClient() +{ + TQObject::connect( + &d->postMessageTimer, TQT_SIGNAL( + timeout()), this, + TQT_SLOT( + processPostedMessagesInternal())); + TQObject::connect( + &d->eventLoopTimer, TQT_SIGNAL( + timeout()), this, TQT_SLOT( + eventLoopTimeout())); +} + +#include <dcopclient.moc> diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34334-Issue_3061_1nl.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34334-Issue_3061_1nl.cpp new file mode 100644 index 00000000..ef73253e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34334-Issue_3061_1nl.cpp @@ -0,0 +1,14 @@ +DCOPClient::DCOPClient() +{ + TQObject::connect( + &d->postMessageTimer, TQT_SIGNAL( + timeout()), this, + TQT_SLOT( + processPostedMessagesInternal())); + TQObject::connect( + &d->eventLoopTimer, TQT_SIGNAL( + timeout()), this, TQT_SLOT( + eventLoopTimeout())); +} + +#include <dcopclient.moc> diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34335-Issue_3061_2nl.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34335-Issue_3061_2nl.cpp new file mode 100644 index 00000000..ef73253e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34335-Issue_3061_2nl.cpp @@ -0,0 +1,14 @@ +DCOPClient::DCOPClient() +{ + TQObject::connect( + &d->postMessageTimer, TQT_SIGNAL( + timeout()), this, + TQT_SLOT( + processPostedMessagesInternal())); + TQObject::connect( + &d->eventLoopTimer, TQT_SIGNAL( + timeout()), this, TQT_SLOT( + eventLoopTimeout())); +} + +#include <dcopclient.moc> diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34336-Issue_3061_0nl.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34336-Issue_3061_0nl.cpp new file mode 100644 index 00000000..c228ce46 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34336-Issue_3061_0nl.cpp @@ -0,0 +1,15 @@ +DCOPClient::DCOPClient() +{ + TQObject::connect( + &d->postMessageTimer, TQT_SIGNAL( + timeout()), this, + TQT_SLOT( + processPostedMessagesInternal())); + TQObject::connect( + &d->eventLoopTimer, TQT_SIGNAL( + timeout()), this, TQT_SLOT( + eventLoopTimeout())); +} + +#include <dcopclient.moc> + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34337-Issue_3061_1nl.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34337-Issue_3061_1nl.cpp new file mode 100644 index 00000000..c228ce46 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34337-Issue_3061_1nl.cpp @@ -0,0 +1,15 @@ +DCOPClient::DCOPClient() +{ + TQObject::connect( + &d->postMessageTimer, TQT_SIGNAL( + timeout()), this, + TQT_SLOT( + processPostedMessagesInternal())); + TQObject::connect( + &d->eventLoopTimer, TQT_SIGNAL( + timeout()), this, TQT_SLOT( + eventLoopTimeout())); +} + +#include <dcopclient.moc> + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34338-Issue_3061_2nl.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34338-Issue_3061_2nl.cpp new file mode 100644 index 00000000..c228ce46 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34338-Issue_3061_2nl.cpp @@ -0,0 +1,15 @@ +DCOPClient::DCOPClient() +{ + TQObject::connect( + &d->postMessageTimer, TQT_SIGNAL( + timeout()), this, + TQT_SLOT( + processPostedMessagesInternal())); + TQObject::connect( + &d->eventLoopTimer, TQT_SIGNAL( + timeout()), this, TQT_SLOT( + eventLoopTimeout())); +} + +#include <dcopclient.moc> + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34339-Issue_3061_0nl.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34339-Issue_3061_0nl.cpp new file mode 100644 index 00000000..7188f0d0 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34339-Issue_3061_0nl.cpp @@ -0,0 +1,16 @@ +DCOPClient::DCOPClient() +{ + TQObject::connect( + &d->postMessageTimer, TQT_SIGNAL( + timeout()), this, + TQT_SLOT( + processPostedMessagesInternal())); + TQObject::connect( + &d->eventLoopTimer, TQT_SIGNAL( + timeout()), this, TQT_SLOT( + eventLoopTimeout())); +} + +#include <dcopclient.moc> + + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34340-Issue_3061_1nl.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34340-Issue_3061_1nl.cpp new file mode 100644 index 00000000..7188f0d0 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34340-Issue_3061_1nl.cpp @@ -0,0 +1,16 @@ +DCOPClient::DCOPClient() +{ + TQObject::connect( + &d->postMessageTimer, TQT_SIGNAL( + timeout()), this, + TQT_SLOT( + processPostedMessagesInternal())); + TQObject::connect( + &d->eventLoopTimer, TQT_SIGNAL( + timeout()), this, TQT_SLOT( + eventLoopTimeout())); +} + +#include <dcopclient.moc> + + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34341-Issue_3061_2nl.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34341-Issue_3061_2nl.cpp new file mode 100644 index 00000000..7188f0d0 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34341-Issue_3061_2nl.cpp @@ -0,0 +1,16 @@ +DCOPClient::DCOPClient() +{ + TQObject::connect( + &d->postMessageTimer, TQT_SIGNAL( + timeout()), this, + TQT_SLOT( + processPostedMessagesInternal())); + TQObject::connect( + &d->eventLoopTimer, TQT_SIGNAL( + timeout()), this, TQT_SLOT( + eventLoopTimeout())); +} + +#include <dcopclient.moc> + + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34350-indent_comma_brace_glob.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34350-indent_comma_brace_glob.cpp new file mode 100644 index 00000000..0e475aa4 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34350-indent_comma_brace_glob.cpp @@ -0,0 +1,7 @@ +#include <string> + +extern char* externBufferWithAVeryLongName; +extern unsigned int externBufferSizeWithLongName; + +std::string foo{ externBufferWithAVeryLongName + , externBufferSizeWithLongName }; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34351-indent_comma_brace_func.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34351-indent_comma_brace_func.cpp new file mode 100644 index 00000000..59b5b996 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34351-indent_comma_brace_func.cpp @@ -0,0 +1,10 @@ +#include <string> + +extern char* externBufferWithAVeryLongName; +extern unsigned int externBufferSizeWithLongName; + +std::string foo() +{ + return std::string{ externBufferWithAVeryLongName + , externBufferSizeWithLongName }; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34360-nl_before_struct_struct.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34360-nl_before_struct_struct.cpp new file mode 100644 index 00000000..032a0dfc --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34360-nl_before_struct_struct.cpp @@ -0,0 +1,17 @@ +#include <string> + + +struct Foo +{ + std::string name; + int value; +}; + + +struct Bar +{ + Foo* parent; + int modifier; +}; + +void baz( Foo*, Bar* ); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34361-nl_before_struct_scoped_enum.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34361-nl_before_struct_scoped_enum.cpp new file mode 100644 index 00000000..02ce38f1 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34361-nl_before_struct_scoped_enum.cpp @@ -0,0 +1,9 @@ +int main(); + +enum struct Baz +{ + Abc = 4 + , Def = 1 +}; + +Baz decide( Baz, Baz ) noexcept; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34370-asm_block_pp.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34370-asm_block_pp.cpp new file mode 100644 index 00000000..e8fc87a6 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34370-asm_block_pp.cpp @@ -0,0 +1,20 @@ + +void add128( uint64_t & rlo, uint64_t & rhi, uint64_t addlo ) { +#if defined(HAVE_X86_64_ASM) + __asm__ ("addq %2, %0\n" + "adcq $0, %1\n" +#if defined(__clang__) + // clang cannot work properly with "g" and silently + // produces hardly-workging code, if "g" is specified; + : "+r" (rlo), "+r" (rhi) + : "m" (addlo) +#else + : "+g" (rlo), "+g" (rhi) + : "g" (addlo) +#endif + ); +#else + rlo += addlo; + rhi += (rlo < addlo); +#endif +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34500-sp_before_case_colon.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34500-sp_before_case_colon.cpp new file mode 100644 index 00000000..54507d64 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34500-sp_before_case_colon.cpp @@ -0,0 +1,12 @@ +int foo(abc_t d) +{ + switch (d) + { + case A: + return 0; + case B: + return 1; + case C: + return 2; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34501-sp_endif_cmt.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34501-sp_endif_cmt.cpp new file mode 100644 index 00000000..9e5b2db8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34501-sp_endif_cmt.cpp @@ -0,0 +1,11 @@ +#if _MSC_VER < 1300 +#define __func__ "???" +#else /* comment 1 */ +#define __func__ __FUNCTION__ +#endif /* comment 2 */ + +#if _MSC_VER < 1300 +#define __func__ "???" +#else // comment 1 +#define __func__ __FUNCTION__ +#endif // comment 2 diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34502-sp_enum_assign.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34502-sp_enum_assign.cpp new file mode 100644 index 00000000..62a271a3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34502-sp_enum_assign.cpp @@ -0,0 +1,6 @@ +typedef enum +{ + A = 0, + B = 1 << 0, + C = 1 << 1 +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34503-sp_enum_assign.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34503-sp_enum_assign.cpp new file mode 100644 index 00000000..2ebab438 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34503-sp_enum_assign.cpp @@ -0,0 +1,6 @@ +typedef enum +{ + A = 0, + B = 1 << 0, + C = 1 << 1 +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34504-issue_574-i.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34504-issue_574-i.cpp new file mode 100644 index 00000000..3366cc79 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34504-issue_574-i.cpp @@ -0,0 +1,5 @@ +class A
+{
+ void check(int strList = 13);
+};
+int A = 5;
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34505-Issue_3220.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34505-Issue_3220.cpp new file mode 100644 index 00000000..fae042d7 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34505-Issue_3220.cpp @@ -0,0 +1,6 @@ +int * b; +auto Func2(Model * model) -> Color * * const; +auto Func2(Model * model) -> Color * * const { + return nullptr; +} +int * Funcf(Model * model, int * *); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34506-Issue_3220.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34506-Issue_3220.cpp new file mode 100644 index 00000000..ba42b013 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34506-Issue_3220.cpp @@ -0,0 +1,6 @@ +int * b; +auto Func2(Model * model) -> Color * * const; +auto Func2(Model * model) -> Color * * const { + return nullptr; +} +int * Funcf(Model * model, int * *); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34507-Issue_3220.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34507-Issue_3220.cpp new file mode 100644 index 00000000..f9f684b8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34507-Issue_3220.cpp @@ -0,0 +1,6 @@ +int*b; +auto Func2(Model*model) -> Color**const; +auto Func2(Model*model) -> Color**const { + return nullptr; +} +int*Funcf(Model*model, int**); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34508-Issue_3220.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34508-Issue_3220.cpp new file mode 100644 index 00000000..aba03416 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34508-Issue_3220.cpp @@ -0,0 +1,6 @@ +int* b; +auto Func2(Model* model) -> Color * * const; +auto Func2(Model* model) -> Color * * const { + return nullptr; +} +int * Funcf(Model* model, int* *); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34509-byref-2.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34509-byref-2.cpp new file mode 100644 index 00000000..ab1b3a6e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34509-byref-2.cpp @@ -0,0 +1,8 @@ +int & aa(int &x,int &b); +// sp_before_byref_func, sp_after_byref_func, sp_before_byref, sp_after_byref, sp_before_byref, sp_after_byref +int aa(int &x,int &) +// sp_before_byref, sp_after_byref, sp_before_unnamed_byref +{ + b = aa(x,b); + c = aa(& y,&d); // sp_addr +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34510-byref-2.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34510-byref-2.cpp new file mode 100644 index 00000000..0ef61cde --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34510-byref-2.cpp @@ -0,0 +1,8 @@ +int & aa(int & x,int & b); +// sp_before_byref_func, sp_after_byref_func, sp_before_byref, sp_after_byref, sp_before_byref, sp_after_byref +int aa(int & x,int &) +// sp_before_byref, sp_after_byref, sp_before_unnamed_byref +{ + b = aa(x,b); + c = aa(& y,&d); // sp_addr +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34511-byref-2.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34511-byref-2.cpp new file mode 100644 index 00000000..db510335 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34511-byref-2.cpp @@ -0,0 +1,8 @@ +int & aa(int & x,int & b); +// sp_before_byref_func, sp_after_byref_func, sp_before_byref, sp_after_byref, sp_before_byref, sp_after_byref +int aa(int & x,int &) +// sp_before_byref, sp_after_byref, sp_before_unnamed_byref +{ + b = aa(x,b); + c = aa(& y,& d); // sp_addr +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34512-byref-2.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34512-byref-2.cpp new file mode 100644 index 00000000..099e3c2b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34512-byref-2.cpp @@ -0,0 +1,8 @@ +int&aa(int&x,int&b); +// sp_before_byref_func, sp_after_byref_func, sp_before_byref, sp_after_byref, sp_before_byref, sp_after_byref +int aa(int&x,int&) +// sp_before_byref, sp_after_byref, sp_before_unnamed_byref +{ + b = aa(x,b); + c = aa(&y,&d); // sp_addr +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34513-sp_cond_question.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34513-sp_cond_question.cpp new file mode 100644 index 00000000..5f5a9e14 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34513-sp_cond_question.cpp @@ -0,0 +1,6 @@ +//example file +int b; +int t; +int f; +int a = b?t:f; +int a = b? :f; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34514-sp_cond_question.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34514-sp_cond_question.cpp new file mode 100644 index 00000000..cec6c827 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34514-sp_cond_question.cpp @@ -0,0 +1,6 @@ +//example file +int b; +int t; +int f; +int a = b ? t : f; +int a = b ? : f; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34515-sp_cond_question.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34515-sp_cond_question.cpp new file mode 100644 index 00000000..39997b4a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34515-sp_cond_question.cpp @@ -0,0 +1,6 @@ +//example file +int b; +int t; +int f; +int a = b ? t : f; +int a = b ? : f; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34516-sp_cond_question.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34516-sp_cond_question.cpp new file mode 100644 index 00000000..c7d79ab9 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34516-sp_cond_question.cpp @@ -0,0 +1,6 @@ +//example file +int b; +int t; +int f; +int a = b?t:f; +int a = b?:f; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34517-semi.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34517-semi.cpp new file mode 100644 index 00000000..6c42948f --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34517-semi.cpp @@ -0,0 +1,11 @@ +for ( i = 1 ; i < 10 ; i++) +{ + a = i ; +} +for ( ; ; ) +{ + a = i ; b = j ; + a = i ; /* comment */ + a = i ; // comment +} +if (p == b) ; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34518-semi.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34518-semi.cpp new file mode 100644 index 00000000..7c8a711e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34518-semi.cpp @@ -0,0 +1,11 @@ +for ( i = 1 ; i < 10 ; i++) +{ + a = i ; +} +for ( ; ; ) +{ + a = i ; b = j; + a = i ; /* comment */ + a = i ; // comment +} +if (p == b) ; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34519-semi.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34519-semi.cpp new file mode 100644 index 00000000..56af135e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34519-semi.cpp @@ -0,0 +1,11 @@ +for ( i = 1;i < 10;i++) +{ + a = i; +} +for (;;) +{ + a = i;b = j; + a = i; /* comment */ + a = i; // comment +} +if (p == b); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34520-comma.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34520-comma.cpp new file mode 100644 index 00000000..e9b0c428 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34520-comma.cpp @@ -0,0 +1,2 @@ +a( , 1); +typedef SLIST_HEAD( , foo) foo_list_t; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34521-comma.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34521-comma.cpp new file mode 100644 index 00000000..e101145a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34521-comma.cpp @@ -0,0 +1,2 @@ +a( , 1); +typedef SLIST_HEAD( , foo) foo_list_t; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34522-comma.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34522-comma.cpp new file mode 100644 index 00000000..bc8ebd4f --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34522-comma.cpp @@ -0,0 +1,2 @@ +a(,1); +typedef SLIST_HEAD(,foo) foo_list_t; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34523-gcc_case_ellipsis.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34523-gcc_case_ellipsis.cpp new file mode 100644 index 00000000..1b0b4088 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34523-gcc_case_ellipsis.cpp @@ -0,0 +1,15 @@ +void f(int i) +{ + switch(i) + { + case 1 ... 2: + { + break; + } + case 3 ... 5: + break; + + default: + break + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34524-bug_1002.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34524-bug_1002.cpp new file mode 100644 index 00000000..713018e4 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34524-bug_1002.cpp @@ -0,0 +1,8 @@ +template< class B1 = void, class B2 = void > +struct conjunction : bool_constant<B1::value1 && B2::value2> +{ +}; +template< class B1 = void, class B2 = void > +struct conjunction : bool_constant<B1::value1&&B2::value2> +{ +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34525-sp_paren_brace.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34525-sp_paren_brace.cpp new file mode 100644 index 00000000..febfb72d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34525-sp_paren_brace.cpp @@ -0,0 +1,18 @@ +void *stopper_for_apply = (int[]) {0}; +// ^ here + +template<typename T, typename U> +auto add(T t, U u) -> decltype(t + u) { +// ^ here + return t + u; +} + +void f()noexcept() { +// ^ here +} + +#define FOO5(x) for(;;) (!(x)) { *(volatile int*)0 = 1; } +// ^ here + +(struct foo) {...} +// ^ here diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34526-sp_paren_brace.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34526-sp_paren_brace.cpp new file mode 100644 index 00000000..4ac73f87 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34526-sp_paren_brace.cpp @@ -0,0 +1,18 @@ +void *stopper_for_apply = (int[]) {0}; +// ^ here + +template<typename T, typename U> +auto add(T t, U u) -> decltype(t + u) { +// ^ here + return t + u; +} + +void f()noexcept() { +// ^ here +} + +#define FOO5(x) for(;;) (!(x)) { *(volatile int*)0 = 1; } +// ^ here + +(struct foo) {...} +// ^ here diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34527-sp_paren_brace.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34527-sp_paren_brace.cpp new file mode 100644 index 00000000..aa65f644 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34527-sp_paren_brace.cpp @@ -0,0 +1,18 @@ +void *stopper_for_apply = (int[]){0}; +// ^ here + +template<typename T, typename U> +auto add(T t, U u) -> decltype(t + u){ +// ^ here + return t + u; +} + +void f()noexcept(){ +// ^ here +} + +#define FOO5(x) for(;;) (!(x)){ *(volatile int*)0 = 1; } +// ^ here + +(struct foo){...} +// ^ here diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34528-cmt_trailing_single_line_c_to_cpp.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34528-cmt_trailing_single_line_c_to_cpp.cpp new file mode 100644 index 00000000..946409b2 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34528-cmt_trailing_single_line_c_to_cpp.cpp @@ -0,0 +1,34 @@ +int main(int argc, char **argv){ + + // C-style comments on same line with actual code + // ---------------------------------------------- + + int a = 5; // Trailing, single-line C-style comment + + int b = /* Single-line C-style comment in the middle */ 5; + + /* Single-line C-style comment at beginning of line */ int c = 5; + + int d = 5; /* Trailing + Multi-line + C-style + comment */ + +# define A_MACRO \ + do { \ + if (true) { \ + int e = 5; /* Trailing single-line C-style comment inside macro*/ \ + } \ + } while (0) + + + // C-style comments with no actual code on the same line + // ----------------------------------------------------- + + // Single-line C-style comment. + + /* Multi-line + * C-style + * comment. + * */ +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34529-type_brace_init_lst.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34529-type_brace_init_lst.cpp new file mode 100644 index 00000000..cc79678f --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34529-type_brace_init_lst.cpp @@ -0,0 +1,87 @@ +// Uncrustify does not process the intention of an using alias, +// unknown_kw will therefore no be parsed as known keyword +using unknown_kw = int; + +int main() +{ + // 'int' is a known c++ keyword + auto a0 = int { 1 }; + auto b0 = unknown_kw { 2 }; + auto c0 = ::unknown_kw { 3 }; + auto d0 = (int) unknown_kw { 4 }; + auto e0 = (int) ::unknown_kw { 5 }; + auto f0 = static_cast<int>(unknown_kw { 6 }); + auto g0 = static_cast<int>(::unknown_kw { 7 }); + + auto a1 = int{ 1 }; + auto b1 = unknown_kw{ 2 }; + auto c1 = ::unknown_kw{ 3 }; + auto d1 = (int) unknown_kw{ 4 }; + auto e1 = (int) ::unknown_kw{ 5 }; + auto f1 = static_cast<int>(unknown_kw{ 6 }); + auto g1 = static_cast<int>(::unknown_kw{ 7 }); + + + + auto a2 = int + + { 1 }; + auto b2 = unknown_kw + + { 2 }; + auto c2 = ::unknown_kw + + { 3 }; + auto d2 = (int) unknown_kw + + { 4 }; + auto e2 = (int) ::unknown_kw + + { 5 }; + auto f2 = static_cast<int>(unknown_kw + + { 6 }); + auto g2 = static_cast<int>(::unknown_kw + + { 7 }); + + + + auto a1 = int{ + + 1 + + }; + auto b1 = unknown_kw{ + + 2 + + }; + auto c1 = ::unknown_kw { + + 3 + + }; + auto d1 = (int) unknown_kw { + + 4 + + }; + auto e1 = (int) ::unknown_kw { + + 5 + + }; + auto f1 = static_cast<int>(unknown_kw { + + 6 + + }); + auto g1 = static_cast<int>(::unknown_kw { + + 7 + + }); + + return 1; +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34530-type_brace_init_lst.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34530-type_brace_init_lst.cpp new file mode 100644 index 00000000..b99238b8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34530-type_brace_init_lst.cpp @@ -0,0 +1,87 @@ +// Uncrustify does not process the intention of an using alias, +// unknown_kw will therefore no be parsed as known keyword +using unknown_kw = int; + +int main() +{ + // 'int' is a known c++ keyword + auto a0 = int { 1}; + auto b0 = unknown_kw { 2}; + auto c0 = ::unknown_kw { 3}; + auto d0 = (int) unknown_kw { 4}; + auto e0 = (int) ::unknown_kw { 5}; + auto f0 = static_cast<int>(unknown_kw { 6}); + auto g0 = static_cast<int>(::unknown_kw { 7}); + + auto a1 = int{ 1}; + auto b1 = unknown_kw{ 2}; + auto c1 = ::unknown_kw{ 3}; + auto d1 = (int) unknown_kw{ 4}; + auto e1 = (int) ::unknown_kw{ 5}; + auto f1 = static_cast<int>(unknown_kw{ 6}); + auto g1 = static_cast<int>(::unknown_kw{ 7}); + + + + auto a2 = int + + { 1}; + auto b2 = unknown_kw + + { 2}; + auto c2 = ::unknown_kw + + { 3}; + auto d2 = (int) unknown_kw + + { 4}; + auto e2 = (int) ::unknown_kw + + { 5}; + auto f2 = static_cast<int>(unknown_kw + + { 6}); + auto g2 = static_cast<int>(::unknown_kw + + { 7}); + + + + auto a1 = int{ + + 1 + + }; + auto b1 = unknown_kw{ + + 2 + + }; + auto c1 = ::unknown_kw { + + 3 + + }; + auto d1 = (int) unknown_kw { + + 4 + + }; + auto e1 = (int) ::unknown_kw { + + 5 + + }; + auto f1 = static_cast<int>(unknown_kw { + + 6 + + }); + auto g1 = static_cast<int>(::unknown_kw { + + 7 + + }); + + return 1; +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34531-type_brace_init_lst.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34531-type_brace_init_lst.cpp new file mode 100644 index 00000000..cc79678f --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34531-type_brace_init_lst.cpp @@ -0,0 +1,87 @@ +// Uncrustify does not process the intention of an using alias, +// unknown_kw will therefore no be parsed as known keyword +using unknown_kw = int; + +int main() +{ + // 'int' is a known c++ keyword + auto a0 = int { 1 }; + auto b0 = unknown_kw { 2 }; + auto c0 = ::unknown_kw { 3 }; + auto d0 = (int) unknown_kw { 4 }; + auto e0 = (int) ::unknown_kw { 5 }; + auto f0 = static_cast<int>(unknown_kw { 6 }); + auto g0 = static_cast<int>(::unknown_kw { 7 }); + + auto a1 = int{ 1 }; + auto b1 = unknown_kw{ 2 }; + auto c1 = ::unknown_kw{ 3 }; + auto d1 = (int) unknown_kw{ 4 }; + auto e1 = (int) ::unknown_kw{ 5 }; + auto f1 = static_cast<int>(unknown_kw{ 6 }); + auto g1 = static_cast<int>(::unknown_kw{ 7 }); + + + + auto a2 = int + + { 1 }; + auto b2 = unknown_kw + + { 2 }; + auto c2 = ::unknown_kw + + { 3 }; + auto d2 = (int) unknown_kw + + { 4 }; + auto e2 = (int) ::unknown_kw + + { 5 }; + auto f2 = static_cast<int>(unknown_kw + + { 6 }); + auto g2 = static_cast<int>(::unknown_kw + + { 7 }); + + + + auto a1 = int{ + + 1 + + }; + auto b1 = unknown_kw{ + + 2 + + }; + auto c1 = ::unknown_kw { + + 3 + + }; + auto d1 = (int) unknown_kw { + + 4 + + }; + auto e1 = (int) ::unknown_kw { + + 5 + + }; + auto f1 = static_cast<int>(unknown_kw { + + 6 + + }); + auto g1 = static_cast<int>(::unknown_kw { + + 7 + + }); + + return 1; +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34532-type_brace_init_lst.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34532-type_brace_init_lst.cpp new file mode 100644 index 00000000..53e74de2 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34532-type_brace_init_lst.cpp @@ -0,0 +1,87 @@ +// Uncrustify does not process the intention of an using alias, +// unknown_kw will therefore no be parsed as known keyword +using unknown_kw = int; + +int main() +{ + // 'int' is a known c++ keyword + auto a0 = int { 1 }; + auto b0 = unknown_kw { 2 }; + auto c0 = ::unknown_kw { 3 }; + auto d0 = (int) unknown_kw { 4 }; + auto e0 = (int) ::unknown_kw { 5 }; + auto f0 = static_cast<int>(unknown_kw { 6 }); + auto g0 = static_cast<int>(::unknown_kw { 7 }); + + auto a1 = int{1}; + auto b1 = unknown_kw{2}; + auto c1 = ::unknown_kw{3}; + auto d1 = (int) unknown_kw{4}; + auto e1 = (int) ::unknown_kw{5}; + auto f1 = static_cast<int>(unknown_kw{6}); + auto g1 = static_cast<int>(::unknown_kw{7}); + + + + auto a2 = int + + {1}; + auto b2 = unknown_kw + + {2}; + auto c2 = ::unknown_kw + + {3}; + auto d2 = (int) unknown_kw + + {4}; + auto e2 = (int) ::unknown_kw + + {5}; + auto f2 = static_cast<int>(unknown_kw + + {6}); + auto g2 = static_cast<int>(::unknown_kw + + {7}); + + + + auto a1 = int{ + + 1 + + }; + auto b1 = unknown_kw{ + + 2 + + }; + auto c1 = ::unknown_kw { + + 3 + + }; + auto d1 = (int) unknown_kw { + + 4 + + }; + auto e1 = (int) ::unknown_kw { + + 5 + + }; + auto f1 = static_cast<int>(unknown_kw { + + 6 + + }); + auto g1 = static_cast<int>(::unknown_kw { + + 7 + + }); + + return 1; +}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34533-templates.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34533-templates.cpp new file mode 100644 index 00000000..5f3d6f90 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34533-templates.cpp @@ -0,0 +1,188 @@ +#include <list> +#include <map> +#include <vector> + +#define MACRO(T) f < T > () + +class MyClass +{ +public: + std::map < int, bool > someData; + std::map < int, std::list < bool > > otherData; +}; + +void foo() +{ + List < byte > bob = new List < byte > (); + +} + +A < B > foo; +A < B,C > bar; +A < B* > baz; +A < B < C > > bay; + +void asd(void) +{ + A < B > foo; + A < B,C > bar; + A < B* > baz; + A < B < C > > bay; + if (a<b && b>c) + { + a = b<c>0; + } + if (a < bar() > c) + { + } + a<up_lim() ? do_hi() : do_low; + a[ a < b > c] = d; +} + +template< typename T > class MyClass +{ + +} + +template< typename T > +class MyClass +{ +} + +template< typename A, typename B, typename C > class MyClass : myvar(0), + myvar2(0) +{ + +} + +template< typename A, typename B, typename C > class MyClass + : myvar(0), + myvar2(0) +{ + +} + + +static int max_value() +{ + return (std :: numeric_limits < int >:: max ) (); +} + +template< class Config_ > +priority_queue < Config_ > :: ~priority_queue () { + +} + +template< class T > +T test(T a) { + return a; +} + +int main() { + int k; + int j; + h g < int >; + k=test < int > (j); + return 0; +} + +template< typename T, template< typename, unsigned int, unsigned int > class ConcreteStorageClass > +class RotationMatrix + : public StaticBaseMatrix < T, 3, 3, ConcreteStorageClass > +{ + +public: + + RotationMatrix() + : StaticBaseMatrix < T, 3, 3, ConcreteStorageClass > () + { + // do some initialization + } + + void assign(const OtherClass < T, 3, 3 >& other) + { + // do something + } + +}; + +int main() +{ + MyClass < double, 3, 3, MyStorage > foo; +} + +template< typename CharT, int N, typename Traits > +inline std::basic_ostream < CharT,Traits >& FWStreamOut(std::basic_ostream < CharT,Traits >& os, + const W::S < CharT,N,Traits >& s) +{ + return operator << < CharT, N, Traits, char, std::char_traits < char > > ( os, s ); +} + +struct foo { + type1 < int& > bar; +}; +struct foo { + type1 < int const > bar; +}; + + +template< int i > void f(); +template< int i > void g() { + f < i - 1 > (); + f < i > (); + f < i + 1 > (); + f < bar() > (); +} +void h() { + g < 42 > (); +} + +#include <vector> +std::vector < int > A(2); +std::vector < int > B; +std::vector < int > C(2); +std::vector < int > D; + +template< class T > struct X { template< class U > void operator ()(U); }; + +template< class T > class Y { template< class V > void f(V); }; + +void (* foobar)(void) = NULL; +std::vector < void (*)(void) > functions; + +#define MACRO( a ) a +template< typename = int > class X; +MACRO ( void f( X < >& x ) ); +void g( X < >& x ); + +#include <vector> +typedef std::vector < std::vector < int > > Table; // OK +typedef std::vector < std::vector < bool > > Flags; // Error + +void func(List < B > = default_val1); +void func(List < List < B > > = default_val2); + +BLAH < (3.14>=42) > blah; +bool X = j < 3 > >1; + +void foo() +{ + A < (X>Y) > a; + a = static_cast < List < B > >(ld); +} + +template< int i > class X { /* ... */ }; +X<1>2>x1; // Syntax error. +X < (1>2) > x2; // Okay. + +template< class T > class Y { /* ... */ }; +Y < X < 1 > > x3; // Okay, same as "Y<X<1> > x3;". +Y < X < (6 >> 1) > > x4; + + +template< typename T > +int +myFunc1(typename T::Subtype val); + +int +myFunc2(T::Subtype val); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34534-templates.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34534-templates.cpp new file mode 100644 index 00000000..9e3f463d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34534-templates.cpp @@ -0,0 +1,188 @@ +#include <list> +#include <map> +#include <vector> + +#define MACRO(T) f < T > () + +class MyClass +{ +public: + std::map < int, bool > someData; + std::map < int, std::list < bool > > otherData; +}; + +void foo() +{ + List < byte > bob = new List < byte > (); + +} + +A < B > foo; +A < B,C > bar; +A < B* > baz; +A < B < C > > bay; + +void asd(void) +{ + A < B > foo; + A < B,C > bar; + A < B* > baz; + A < B < C > > bay; + if (a<b && b>c) + { + a = b<c>0; + } + if (a < bar() > c) + { + } + a<up_lim() ? do_hi() : do_low; + a[ a < b > c] = d; +} + +template< typename T > class MyClass +{ + +} + +template< typename T > +class MyClass +{ +} + +template< typename A, typename B, typename C > class MyClass : myvar(0), + myvar2(0) +{ + +} + +template< typename A, typename B, typename C > class MyClass + : myvar(0), + myvar2(0) +{ + +} + + +static int max_value() +{ + return (std :: numeric_limits < int >:: max ) (); +} + +template< class Config_ > +priority_queue < Config_ > :: ~priority_queue () { + +} + +template< class T > +T test(T a) { + return a; +} + +int main() { + int k; + int j; + h g < int >; + k=test < int >(j); + return 0; +} + +template< typename T, template< typename, unsigned int, unsigned int > class ConcreteStorageClass > +class RotationMatrix + : public StaticBaseMatrix < T, 3, 3, ConcreteStorageClass > +{ + +public: + + RotationMatrix() + : StaticBaseMatrix < T, 3, 3, ConcreteStorageClass > () + { + // do some initialization + } + + void assign(const OtherClass < T, 3, 3 >& other) + { + // do something + } + +}; + +int main() +{ + MyClass < double, 3, 3, MyStorage > foo; +} + +template< typename CharT, int N, typename Traits > +inline std::basic_ostream < CharT,Traits >& FWStreamOut(std::basic_ostream < CharT,Traits >& os, + const W::S < CharT,N,Traits >& s) +{ + return operator << < CharT, N, Traits, char, std::char_traits < char > >( os, s ); +} + +struct foo { + type1 < int& > bar; +}; +struct foo { + type1 < int const > bar; +}; + + +template< int i > void f(); +template< int i > void g() { + f < i - 1 > (); + f < i > (); + f < i + 1 > (); + f < bar() > (); +} +void h() { + g < 42 > (); +} + +#include <vector> +std::vector < int > A(2); +std::vector < int > B; +std::vector < int > C(2); +std::vector < int > D; + +template< class T > struct X { template< class U > void operator ()(U); }; + +template< class T > class Y { template< class V > void f(V); }; + +void (* foobar)(void) = NULL; +std::vector < void (*)(void) > functions; + +#define MACRO( a ) a +template< typename = int > class X; +MACRO ( void f( X < >& x ) ); +void g( X < >& x ); + +#include <vector> +typedef std::vector < std::vector < int > > Table; // OK +typedef std::vector < std::vector < bool > > Flags; // Error + +void func(List < B > = default_val1); +void func(List < List < B > > = default_val2); + +BLAH < (3.14>=42) > blah; +bool X = j < 3 > >1; + +void foo() +{ + A < (X>Y) > a; + a = static_cast < List < B > >(ld); +} + +template< int i > class X { /* ... */ }; +X<1>2>x1; // Syntax error. +X < (1>2) > x2; // Okay. + +template< class T > class Y { /* ... */ }; +Y < X < 1 > > x3; // Okay, same as "Y<X<1> > x3;". +Y < X < (6 >> 1) > > x4; + + +template< typename T > +int +myFunc1(typename T::Subtype val); + +int +myFunc2(T::Subtype val); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34535-sp_after_angle.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34535-sp_after_angle.cpp new file mode 100644 index 00000000..18788919 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34535-sp_after_angle.cpp @@ -0,0 +1,6 @@ +template < typename T> +struct foo {}; + +Q_DECLARE_METATYPE(foo < int> ) + +int bar(foo <int > ); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34536-sp_after_angle.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34536-sp_after_angle.cpp new file mode 100644 index 00000000..8764578e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34536-sp_after_angle.cpp @@ -0,0 +1,6 @@ +template<typename T> +struct foo {}; + +Q_DECLARE_METATYPE(foo<int>) + +int bar(foo<int>); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34540-byref-4.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34540-byref-4.cpp new file mode 100644 index 00000000..0fe49c7b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34540-byref-4.cpp @@ -0,0 +1,5 @@ +int&(*fn)(int, struct sockaddr&); +int& (*fn)(int, struct sockaddr&); +int &(*fn)(int, struct sockaddr&); +int & (*fn)(int, struct sockaddr&); +int & (*fn)(int, struct sockaddr&); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34541-byref-4.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34541-byref-4.cpp new file mode 100644 index 00000000..779da86b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34541-byref-4.cpp @@ -0,0 +1,5 @@ +int& (*fn)(int, struct sockaddr&); +int& (*fn)(int, struct sockaddr&); +int & (*fn)(int, struct sockaddr&); +int & (*fn)(int, struct sockaddr&); +int & (*fn)(int, struct sockaddr&); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34542-byref-4.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34542-byref-4.cpp new file mode 100644 index 00000000..16a7ba9b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34542-byref-4.cpp @@ -0,0 +1,5 @@ +int&(*fn)(int, struct sockaddr&); +int&(*fn)(int, struct sockaddr&); +int &(*fn)(int, struct sockaddr&); +int &(*fn)(int, struct sockaddr&); +int &(*fn)(int, struct sockaddr&); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34543-byref-4.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34543-byref-4.cpp new file mode 100644 index 00000000..6bd2e9be --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34543-byref-4.cpp @@ -0,0 +1,5 @@ +int& (*fn)(int, struct sockaddr&); +int& (*fn)(int, struct sockaddr&); +int & (*fn)(int, struct sockaddr&); +int & (*fn)(int, struct sockaddr&); +int & (*fn)(int, struct sockaddr&); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34550-throws.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34550-throws.cpp new file mode 100644 index 00000000..f4e781fb --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34550-throws.cpp @@ -0,0 +1,17 @@ +int main() +{ + throw("error"); + + throw ("error"); + + throw"error"; + + throw "error"; + + throw + "error"; + + throw + + "error"; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34551-throws.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34551-throws.cpp new file mode 100644 index 00000000..2a8c2ef0 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34551-throws.cpp @@ -0,0 +1,21 @@ +int main() +{ + throw + ("error"); + + throw + ("error"); + + throw + "error"; + + throw + "error"; + + throw + "error"; + + throw + + "error"; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34552-throws.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34552-throws.cpp new file mode 100644 index 00000000..cca784aa --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34552-throws.cpp @@ -0,0 +1,14 @@ +int main() +{ + throw("error"); + + throw ("error"); + + throw"error"; + + throw "error"; + + throw"error"; + + throw"error"; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34553-throws.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34553-throws.cpp new file mode 100644 index 00000000..f8a4cc04 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34553-throws.cpp @@ -0,0 +1,20 @@ +int main() +{ + throw + ("error"); + + throw + ("error"); + + throw + "error"; + + throw + "error"; + + throw + "error"; + + throw + "error"; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34554-throws.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34554-throws.cpp new file mode 100644 index 00000000..f4e781fb --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34554-throws.cpp @@ -0,0 +1,17 @@ +int main() +{ + throw("error"); + + throw ("error"); + + throw"error"; + + throw "error"; + + throw + "error"; + + throw + + "error"; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34555-throws.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34555-throws.cpp new file mode 100644 index 00000000..26028e4d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34555-throws.cpp @@ -0,0 +1,17 @@ +int main() +{ + throw("error"); + + throw ("error"); + + throw("error"); + + throw("error"); + + throw + ("error"); + + throw + + ("error"); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34556-throws.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34556-throws.cpp new file mode 100644 index 00000000..6449e658 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34556-throws.cpp @@ -0,0 +1,17 @@ +int main() +{ + throw "error"; + + throw "error"; + + throw"error"; + + throw "error"; + + throw + "error"; + + throw + + "error"; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34557-throws.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34557-throws.cpp new file mode 100644 index 00000000..26028e4d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/34557-throws.cpp @@ -0,0 +1,17 @@ +int main() +{ + throw("error"); + + throw ("error"); + + throw("error"); + + throw("error"); + + throw + ("error"); + + throw + + ("error"); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/39000-UNI-64325.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/39000-UNI-64325.cpp new file mode 100644 index 00000000..c4005d7c --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/39000-UNI-64325.cpp @@ -0,0 +1,13 @@ +class function_ref +{ +public: + template<typename CallableT> + function_ref(CallableT &&t) noexcept + : m_Ptr((void *)std::addressof(t)) + , m_ErasedFn([](void *ptr, Args... args) -> ReturnValue + { + // Type erasure lambda: cast ptr back to original type and dispatch the call + return (*reinterpret_cast<std::add_pointer_t<CallableT>>(ptr))(std::forward<Args>(args)...); + }) + {} +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60001-UNI-2650.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60001-UNI-2650.cpp new file mode 100644 index 00000000..b9ced773 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60001-UNI-2650.cpp @@ -0,0 +1,13 @@ +MergeJSFiles(new string[] { + GetDecompressor(), + Paths.Combine(buildToolsDir, "UnityConfig"), + Paths.Combine(args.stagingAreaData, kOutputFileLoaderFileName), +}, unityLoader +); + + +throw new System.Exception( + "'Fast Rebuild' option requires prebuilt JavaScript version of Unity engine. The following files are missing: " + + (!File.Exists(UnityNativeJs) ? "\n" + UnityNativeJs : "") + + (!File.Exists(UnityNativeJs + ".mem") ? "\n" + UnityNativeJs + ".mem" : "") +); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60002-UNI-16283.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60002-UNI-16283.cpp new file mode 100644 index 00000000..7f042642 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60002-UNI-16283.cpp @@ -0,0 +1,5 @@ +// It is deleting the space after the pointer marker +void foo() +{ + extern void BillboardRenderer_RenderMultiple(const RenderBatchedData& renderData, ShaderChannelMask channels); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60003-UNI-1288.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60003-UNI-1288.cpp new file mode 100644 index 00000000..aece270a --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60003-UNI-1288.cpp @@ -0,0 +1,10 @@ +if (Application.platform == RuntimePlatform.LinuxEditor) +{ + return new ProcessStartInfo("smthg") + { + Arguments = string.Format("-9 --ss -S aa \"{0}\"", file), + WorkingDirectory = Directory.GetCurrentDirectory(), + UseShellExecute = false, + CreateNoWindow = true + }; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60006-UNI-2049.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60006-UNI-2049.cpp new file mode 100644 index 00000000..7e47d927 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60006-UNI-2049.cpp @@ -0,0 +1,8 @@ +// Pointer mark should be formatted (WINAPI* SetXX) +typedef DWORD (WINAPI* SetDllDirectory) (LPCSTR); +// Pointer mark should be formatted (EXCEPTION_POINTERS* pExt) +static LONG WINAPI CustomUnhandledExceptionFilter(EXCEPTION_POINTERS* pExInfo) +{ + if (EXCEPTION_BREAKPOINT == pExInfo->ExceptionRecord->ExceptionCode) // Breakpoint. Don't treat this as a normal crash. + return EXCEPTION_CONTINUE_SEARCH; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60017-UNI-2683.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60017-UNI-2683.cpp new file mode 100644 index 00000000..734e3999 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60017-UNI-2683.cpp @@ -0,0 +1,2 @@ +// It shouldn't add a space after Unity::Type +static Object* Produce(const Unity::Type* type, InstanceID instanceID = InstanceID_None, MemLabelId = kMemBaseObject, ObjectCreationMode mode = kCreateObjectDefault); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60022-UNI-18439.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60022-UNI-18439.cpp new file mode 100644 index 00000000..8d467c67 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60022-UNI-18439.cpp @@ -0,0 +1,12 @@ +floatNx3 randomRotationMatrices[3]; +if (rotationRandomnessX > epsilon() || rotationRandomnessY > epsilon()) +{ +// Parameters are being double indented. + floatNx3 rotationEuler = floatNx3( + (GenerateRandom(randomSeed + intN(kParticleSystemExternalForcesRotationRandomnessXId)) * 2 - 1) * rotationRandomnessX, + (GenerateRandom(randomSeed + intN(kParticleSystemExternalForcesRotationRandomnessYId)) * 2 - 1) * rotationRandomnessY, + floatN(ZERO)); + eulerToMatrix(rotationEuler, randomRotationMatrices); + + toForce = mul(randomRotationMatrices, toForce); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60025-UNI-19894.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60025-UNI-19894.cpp new file mode 100644 index 00000000..2d7e481e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60025-UNI-19894.cpp @@ -0,0 +1,16 @@ +//It is applying double indentation +m_ApplicationView = AppC::ApplicationView::GetForCurrentView(); +m_ViewConsolidateEvtToken = m_ApplicationView->Consolidated += + ref new AppC::TypedEventHandler<AppC::ApplicationView^, AppC::ApplicationViewConsolidatedEventArgs^>(this, &FrameworkView::InternalOnViewConsolidated); + +m_WindowActivatedEvtToken = m_CoreWindow->Activated += + ref new AppC::TypedEventHandler<AppC::CoreWindow^, AppC::WindowActivatedEventArgs^>(this, &FrameworkView::InternalOnWindowActivated); + +m_SizeChangedEvtToken = m_CoreWindow->SizeChanged += + ref new AppC::TypedEventHandler<AppC::CoreWindow^, AppC::WindowSizeChangedEventArgs^>(this, &FrameworkView::InternalOnWindowSizeChanged); + +m_VisibilityChangedEvtToken = m_CoreWindow->VisibilityChanged += + ref new AppC::TypedEventHandler<AppC::CoreWindow^, AppC::VisibilityChangedEventArgs^>(this, &FrameworkView::InternalOnWindowVisibilityChanged); + +m_WindowClosedEvtToken = m_CoreWindow->Closed += + ref new AppC::TypedEventHandler<AppC::CoreWindow^, AppC::CoreWindowEventArgs^>(this, &FrameworkView::InternalOnWindowClosed); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60027-UNI-21506.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60027-UNI-21506.cpp new file mode 100644 index 00000000..a8c5f2df --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60027-UNI-21506.cpp @@ -0,0 +1,13 @@ +struct bar
+{
+ void (Namespace::*method)(Class& param);
+};
+
+void Class::Foo(void (*callback)(const Class& entry))
+{
+}
+
+void foo()
+{
+ int a = 1; // if you comment this out, the bug stops reproducing
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60028-UNI-21509.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60028-UNI-21509.cpp new file mode 100644 index 00000000..bde48ee7 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60028-UNI-21509.cpp @@ -0,0 +1,15 @@ +void (*foo)(int);
+static bar(void (*foo)(int))
+{
+}
+
+bool (*comp_func)(const TypeA*const a, const TypeB& value) = NULL;
+static foo(bool (*comp_func)(const TypeA*const a, const TypeB& value));
+static foo(bool (*comp_func)(const TypeA*const a, const TypeB& value) = NULL)
+{
+}
+
+void qsort(void *base, size_t nmemb, size_t size, int(*compar)(const TypeA* lhs, const TypeB& rhs));
+void qsort(void *base, size_t nmemb, size_t size, int(*compar)(const TypeA* lhs, const TypeB& rhs) = NULL)
+{
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60029-UNI-21510.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60029-UNI-21510.cpp new file mode 100644 index 00000000..ea406fbe --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60029-UNI-21510.cpp @@ -0,0 +1 @@ +typedef std::pair<Type* const, TypeB> Object;
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60030-UNI-21727.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60030-UNI-21727.cpp new file mode 100644 index 00000000..991d2631 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60030-UNI-21727.cpp @@ -0,0 +1,18 @@ +void foo()
+{
+ int error = 0;
+#if defined(SUPPORT_FEATURE)
+ error = feature_bar();
+#else // feature not supported
+ // we call bar otherwise
+ error = bar();
+#endif // SUPPORT_FEATURE
+ // continue with function logic
+ if (error != 0)
+ {
+#if 0 // TODO: this is disabled
+ // call final bar
+ error_bar(error);
+#endif
+ }
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60031-UNI-21728.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60031-UNI-21728.cpp new file mode 100644 index 00000000..658fba68 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60031-UNI-21728.cpp @@ -0,0 +1 @@ +friend std::ostream& operator<<(std::ostream& os, const ScriptingObjectPtr& o);
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60032-UNI-21729.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60032-UNI-21729.cpp new file mode 100644 index 00000000..4b8d1d59 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60032-UNI-21729.cpp @@ -0,0 +1,3 @@ +extern "C" void __declspec(dllexport) GetAccountNameAndDomain(HWND /*hwndParent*/, int string_size, TCHAR * variables, stack_t** stacktop, extra_parameters* /*extra*/)
+{
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60036-UNI-2680.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60036-UNI-2680.cpp new file mode 100644 index 00000000..b6aa5bd7 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60036-UNI-2680.cpp @@ -0,0 +1,3 @@ +A(B(C( + D(a | + b | c)))); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60038-UNI-30088.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60038-UNI-30088.cpp new file mode 100644 index 00000000..1fd5c1fe --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60038-UNI-30088.cpp @@ -0,0 +1,9 @@ +void Foo(int value)
+{
+ m_Foo[0].prop
+ = m_Foo[1].prop
+ = m_Foo[2].prop
+ = m_Foo[3].prop
+ = m_Foo[4].prop
+ = m_Foo[5].prop = value;
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60039-UNI-30628.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60039-UNI-30628.cpp new file mode 100644 index 00000000..ffa60026 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60039-UNI-30628.cpp @@ -0,0 +1,7 @@ +// Regression 1 FAKE_METHOD expands to a function prototype. Could possibly use PROTO_WRAP like for FAKE_FUNCTION
+class Foo
+{
+ FAKE_FUNCTION(Bar, GetBarInfo, const BarInfo &());
+ FAKE_METHOD(Bar, GetBarInfo, const BarInfo &());
+ FAKE_FUNCTION_WITH_LOCAL_NAME(FakeGetCommonScriptingClasses, GetCommonScriptingClasses, const CommonScriptingClasses &());
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60042-UNI-18777.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60042-UNI-18777.cpp new file mode 100644 index 00000000..0f177fdc --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60042-UNI-18777.cpp @@ -0,0 +1,9 @@ +// I want to keeep the function call indented +Thingy + .Select() + .ToList(); + +// it works with a var +var x = Thingy + .Select() + .ToList(); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60043-i2033.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60043-i2033.cpp new file mode 100644 index 00000000..fd27cf6d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60043-i2033.cpp @@ -0,0 +1,7 @@ +/* *INDENT-OFF* */ +enum E_SUNSENSOR { + EXAMPLE1, + EXAMPLE2, + SN005 +}; +/* *INDENT-ON* */ diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60044-i2116.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60044-i2116.cpp new file mode 100644 index 00000000..af664cd9 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60044-i2116.cpp @@ -0,0 +1 @@ +void f(){} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60045-align_asterisk_after_type_cast.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60045-align_asterisk_after_type_cast.cpp new file mode 100644 index 00000000..364b2a6b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60045-align_asterisk_after_type_cast.cpp @@ -0,0 +1,30 @@ +#define MEM_ASSERT1(x) if (!(x)) *(volatile int *)0 = 1 +#define MEM_ASSERT2(x) if (!(x)) *(volatile int *)0 = 1 +#define MEM_ASSERT3(x) if (!(x)) *(volatile int *)0 = 1; +#define MEM_ASSERT4(x) if (!(x)) *(volatile int *)0 = 1; +#define MEM_ASSERT5(x) if (!(x)) { *(volatile int *)0 = 1; } +#define MEM_ASSERT6(x) if (!(x)) { *(volatile int *)0 = 1; } + +#define FOO1(x) while (!(x)) { *(volatile int *)0 = 1; } +#define FOO2(x) while (!(x)) *(volatile int *)0 = 1; +#define FOO3(x) { *(volatile int *)0 = 1; } +#define FOO4(x) *(volatile int *)0 = 1; +#define FOO5(x) for(;;) (!(x)) { *(volatile int *)0 = 1; } +#define FOO6(x) for(;;) (!(x)) *(volatile int *)0 = 1; +#define FOO7(x) do { *(volatile int *)0 = 1; } while (false); + +void foo1(int x) { + if (!(x)) *(volatile int *)0 = 1; +} + +void foo2(int x) { + if (!(x)) *(volatile int *)0 = 1; +} + +void foo3(int x) { + if (!(x)) { *(volatile int *)0 = 1; } +} + +void foo4(int x) { + if (!(x)) { *(volatile int *)0 = 1; } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60046-align_continuation_left_shift.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60046-align_continuation_left_shift.cpp new file mode 100644 index 00000000..c0c066b8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60046-align_continuation_left_shift.cpp @@ -0,0 +1,25 @@ +std::string foo(struct tm* local) { + std::stringstream timestamp; + timestamp << + (local->tm_year + 1900) << "." << + (local->tm_mon + 1) << "." << + local->tm_mday << "-" << + local->tm_hour << "." << + local->tm_min << "." << + local->tm_sec; + return timestamp.str(); +} + +std::string foo2(struct tm* local) { + std::stringstream timestamp; + int year = local->tm_year + 1900; + int mon = local->tm_mon + 1; + timestamp << + year << "." << + mon << "." << + local->tm_mday << "-" << + local->tm_hour << "." << + local->tm_min << "." << + local->tm_sec; + return timestamp.str(); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60047-align_default_after_override.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60047-align_default_after_override.cpp new file mode 100644 index 00000000..43db090f --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60047-align_default_after_override.cpp @@ -0,0 +1,28 @@ +class B +{ +public: +B() = default; +virtual ~B() = default; +}; + +class D1 : public B +{ +public: +D1() = default; +~D1() = default; +D1(const D1&) = delete; +D1(D1&&) = delete; +D1& operator=(const D1&) = delete; +D1& operator=(const D1&&) = delete; +}; + +class D2 : public B +{ +public: +D2() = default; +~D2() override = default; +D2(const D2&) = delete; +D2(D2&&) = delete; +D2& operator=(const D2&) = delete; +D2& operator=(D2&&) = delete; +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60048-bug_2322.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60048-bug_2322.cpp new file mode 100644 index 00000000..50454903 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60048-bug_2322.cpp @@ -0,0 +1,12 @@ +void main() +{ + if (foo()) bar(); + else if (baz({ rick, morty })) anime(); + else if (a) while (true) amime2(); + else if (b) do amime3(); while (false); + else if (c) for(;;) amime5(); + else if (d) while(true) {} + else if (e) do {} while (false); + else if (f) for(;;) {} + else amime6(); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60049-bug_2402.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60049-bug_2402.cpp new file mode 100644 index 00000000..e483fdc9 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60049-bug_2402.cpp @@ -0,0 +1,10 @@ +void +h1(const int a) +{ + switch (a) + { + case 1: { + callFunction(a); break; + } + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60051-bug_2371.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60051-bug_2371.cpp new file mode 100644 index 00000000..f17cec62 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60051-bug_2371.cpp @@ -0,0 +1,101 @@ +class CMyClass +{ + CMyClass( int a = 0, int b = 0 ); +}; + +class CMyClass2 +{ + CMyClass2( int a = 0, int b = 0 ); + CMyClass2( int a = 0 ); +}; + +class CMyClass3 +{ + CMyClass3( int a, int b = 0 ); + CMyClass3( int a = 0 ); +}; + +class CMyClass4 +{ + CMyClass4( int a = 0, int b = 0 ); + CMyClass4( short aa = 0, char * p = 0 ); +}; + +class CMyClass5 +{ + CMyClass5() = default; + CMyClass5( int a = 0, int b = 0 ); + CMyClass5( short aa = 0, char * p = 0 ); +}; + +class CMyClass6 +{ + CMyClass6( const CMyClass6& ) = default; + CMyClass6( int a = 0, int b = 0 ); + CMyClass6( short aa = 0, char * p = 0 ); +}; + +class CMyClass7 +{ + virtual void foo( const void* p = nullptr ) = 0; + CMyClass7( int a = 0, int b = 0 ); + CMyClass7( short aa = 0, char * p = 0 ); +}; + +class CMyClass8 +{ + CMyClass8( int a = 0, int b = 0 ); + CMyClass8( short aa = 0, char * p = 0 ); + virtual void foo( const void* p = nullptr ) = 0; +}; + +class CMyClass9 +{ + CMyClass9( int a = 0, int b = 0 ); + CMyClass9( short aa = 0, char * p = 0 ); + virtual void foo( const void* = nullptr ) = 0; +}; + +class CMyClassA +{ + CMyClassA( int a = 0, int b = 0 ); + CMyClassA( short aa = 0, char * p = 0 ); + virtual void foo( const void* /* p */ = nullptr ) = 0; +}; + +class CMyClassB +{ + CMyClassB( int a = 0, int b = 0 ); + CMyClassB( short aa = 0, char * p = 0 ); + virtual void foo( const void* /* p */ = NULL ) = 0; +}; + +#define UNUSED(x) + +class CMyClassC +{ + CMyClassC( int a = 0, int b = 0 ); + CMyClassC( short aa = 0, char * p = 0 ); + virtual void foo( const void* UNUSED(p) = NULL ) = 0; +}; + +class CMyClassD +{ + CMyClassD( int a = 0, int b = 0 ); + CMyClassD( short aa = 0, char * p = 0 ); + virtual void foo( const std::string s = "" ) = 0; +}; + +class CMyClassE +{ + CMyClassE( int a = 0, int b = 0 ); + CMyClassE( short aa = 0, char * p = 0 ); + virtual void foo( const std::string s = std::string() ) = 0; +}; + +class CMyClassF +{ + CMyClassF( int a = 0, int b = 0 ); + CMyClassF( short aa = 0, char * p = 0 ); + virtual void foo( const CString& s = _T( "" ) ) = 0; +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60052-bug_2433_1.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60052-bug_2433_1.cpp new file mode 100644 index 00000000..d011d5a1 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60052-bug_2433_1.cpp @@ -0,0 +1,12 @@ +namespace A { + +namespace S { + +class C +{ +}; + +} // namespace S + +} // namespace A + diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60053-bug_2433_2.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60053-bug_2433_2.cpp new file mode 100644 index 00000000..600efc82 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60053-bug_2433_2.cpp @@ -0,0 +1,40 @@ +void f(); + +namespace A { + +void f2(); + +namespace S { + +void f3(); + +class C +{ +}; + +void f4(); + +} // namespace S + +void f5(); + +} // namespace A + +void f6(); + +namespace E +{ + +void f7(); + +class D +{ +}; + +; +void f9(); + +} + +; +void f10(); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60054-interface-keyword-in-cpp.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60054-interface-keyword-in-cpp.cpp new file mode 100644 index 00000000..ed92e698 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60054-interface-keyword-in-cpp.cpp @@ -0,0 +1,69 @@ +#include "sdkconfig.h" + +#include <fs/nvs_storage.hpp> +#include <network/interface.hpp> + +extern "C" void app_main (void) { + fs::nvs_storage::initialize (); + network::interface::initialize (); +} + +#include "sdkconfig.h" +#include "esp_wifi.h" +#include "network/interface.hpp" + + +using namespace network; +void interface::initialize () { + tcpip_adapter_init (); +} + +// ---------------------------------------- + +namespace A { +class interface { +public: +interface() { +} + +~interface() { +} + +void foo() { +} +}; +} + +namespace B { +class interface { +public: +interface(); +~interface(); +void foo(); +}; + +inline interface::interface() { +} +inline interface::~interface() { +} +inline void interface::foo() { +} +} + +namespace C { +class interface { +public: +interface(); +~interface(); +void foo(); +}; + +interface::interface() { +} +interface::~interface() { +} +void interface::foo() { +} +} + +interface ::external_iterface; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60055-issue_3116.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60055-issue_3116.cpp new file mode 100644 index 00000000..fcc38415 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60055-issue_3116.cpp @@ -0,0 +1,233 @@ +// Singular with various newline formats +auto f = [] -> void { + return; +}; + +auto f = [] -> void { + return; +}(); + +auto f = [] -> void +{ + return; +}(); + +auto f = + [] -> void { + return; + }; + +auto f = + [] -> void + { + return; + }; + +auto f + = [] -> void { + int i = 0; + return; + }; + +auto f + = [] + { + int i = 0; + return; + }; + +// Nested lambda +auto f = [] { + auto g = [] { + auto h = [] { + return; + }; + return; + }; + return; +}; + +auto f = [] { + auto g = [] + { + auto h = [] { + return; + }; + return; + }; + return; +}; + +auto f = [] +{ + auto g = [] { + auto h = [] + { + return; + }; + return; + }; + return; +}; + +// Nested lambda within functions +Func( + [] { + return; + }, + [] { + return; + } +); + +Func([] { + return; + }, + [] { + return; + } +); + +Func([] { + return; + }, + [] { + return; + } +)(); + +Func([] { + return; + }, + [] { + return; + })(); + +Func([] { + return; + }, + [] { + return; + }); + +A( + B([] (const std::string &s) -> bool { + s = "hello"; + return true; + }), 1 +); + +A( + B( + [] (const std::string &s) -> bool { + s = "hello"; + return true; + } + ), 1 +); + +// Inside scope +{ + std::thread([](const char *c) { + std::cout << c << std::endl; + }).detach(); + + std::thread( + [](const char *c) { + std::cout << c << std::endl; + } + ).detach(); + + auto f = [&](int a) { + return b; + }; + + auto f = [&](int a) + { + return b; + }; +} + +Func(std::count_if(v.begin(), v.end(), [&](const auto &a) { + return a == 3; + })); + +Func( + std::count_if(v.begin(), v.end(), [&](const auto &a) + { + return a == 3; + })); + +Func( + std::count_if(v.begin(), v.end(), [&](const auto &a) { + return a == 3; + })); + +Func( + std::count_if(v.begin(), v.end(), [&](const auto &a) { + return a == 3; + }) +); + +// Test case from issue #3116 +const auto compare = [] (const auto i, const auto j) +{ + return i >= j; +}; + +std::sort( + vector.begin(), + vector.end(), + [] (const auto i, const auto j) + { + return i >= j; + } +); + +// Test case from issue #3116 +if(isWidgetOfCurrentRow) +{ + it = std::find_if( + reloaded.begin(), + reloaded.end(), + [&rowGuid](const auto& device) + { + return (device.thingGUID == rowGuid && !device.isWidget); + } + ); +} +else +{ + it = std::find_if( + reloaded.begin(), + reloaded.end(), + [&rowGuid](const auto& device) + { + return device.thingGUID == rowGuid; + } + ); +} + +// Test case from issue 1296 and some variants +obj->Func([&](int a) + { + return b; + }); + +obj->Func([] -> int + { + return b; + }); + +obj->Func([] + { + return b; + } +); + +obj->Func( + Func([] + { + return b; + }) +); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60056-issue_3116-2.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60056-issue_3116-2.cpp new file mode 100644 index 00000000..0ce38756 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60056-issue_3116-2.cpp @@ -0,0 +1,41 @@ +obj.AddObject(Object::UniqueName(), 10, [this] { + holder.Access([this](const auto &info) { + if (IsGood(info)) { + Add(info); + } + }); + }); + +obj.AddObject( + Object::UniqueName(), + 10, + [this] { + holder.Access([this](const auto &info) { + if (IsGood(info)) { + Add(info); + } + }); + } +); + +{ + obj.AddObject(Object::UniqueName(), 10, [this] { + holder.Access([this](const auto &info) { + if (IsGood(info)) { + Add(info); + } + }); + }); + + obj.AddObject( + Object::UniqueName(), + 10, + [this] { + holder.Access([this](const auto &info) { + if (IsGood(info)) { + Add(info); + } + }); + } + ); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60057-issue_3116.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60057-issue_3116.cpp new file mode 100644 index 00000000..991c46bd --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60057-issue_3116.cpp @@ -0,0 +1,233 @@ +// Singular with various newline formats +auto f = [] -> void { + return; + }; + +auto f = [] -> void { + return; + }(); + +auto f = [] -> void + { + return; + }(); + +auto f = + [] -> void { + return; + }; + +auto f = + [] -> void + { + return; + }; + +auto f + = [] -> void { + int i = 0; + return; + }; + +auto f + = [] + { + int i = 0; + return; + }; + +// Nested lambda +auto f = [] { + auto g = [] { + auto h = [] { + return; + }; + return; + }; + return; + }; + +auto f = [] { + auto g = [] + { + auto h = [] { + return; + }; + return; + }; + return; + }; + +auto f = [] + { + auto g = [] { + auto h = [] + { + return; + }; + return; + }; + return; + }; + +// Nested lambda within functions +Func( + [] { + return; + }, + [] { + return; + } +); + +Func([] { + return; + }, + [] { + return; + } +); + +Func([] { + return; + }, + [] { + return; + } +)(); + +Func([] { + return; + }, + [] { + return; + })(); + +Func([] { + return; + }, + [] { + return; + }); + +A( + B([] (const std::string &s) -> bool { + s = "hello"; + return true; + }), 1 +); + +A( + B( + [] (const std::string &s) -> bool { + s = "hello"; + return true; + } + ), 1 +); + +// Inside scope +{ + std::thread([](const char *c) { + std::cout << c << std::endl; + }).detach(); + + std::thread( + [](const char *c) { + std::cout << c << std::endl; + } + ).detach(); + + auto f = [&](int a) { + return b; + }; + + auto f = [&](int a) + { + return b; + }; +} + +Func(std::count_if(v.begin(), v.end(), [&](const auto &a) { + return a == 3; + })); + +Func( + std::count_if(v.begin(), v.end(), [&](const auto &a) + { + return a == 3; + })); + +Func( + std::count_if(v.begin(), v.end(), [&](const auto &a) { + return a == 3; + })); + +Func( + std::count_if(v.begin(), v.end(), [&](const auto &a) { + return a == 3; + }) +); + +// Test case from issue #3116 +const auto compare = [] (const auto i, const auto j) + { + return i >= j; + }; + +std::sort( + vector.begin(), + vector.end(), + [] (const auto i, const auto j) + { + return i >= j; + } +); + +// Test case from issue #3116 +if(isWidgetOfCurrentRow) +{ + it = std::find_if( + reloaded.begin(), + reloaded.end(), + [&rowGuid](const auto& device) + { + return (device.thingGUID == rowGuid && !device.isWidget); + } + ); +} +else +{ + it = std::find_if( + reloaded.begin(), + reloaded.end(), + [&rowGuid](const auto& device) + { + return device.thingGUID == rowGuid; + } + ); +} + +// Test case from issue 1296 and some variants +obj->Func([&](int a) + { + return b; + }); + +obj->Func([] -> int + { + return b; + }); + +obj->Func([] + { + return b; + } +); + +obj->Func( + Func([] + { + return b; + }) +); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60058-issue_3330.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60058-issue_3330.cpp new file mode 100644 index 00000000..37062480 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60058-issue_3330.cpp @@ -0,0 +1,9 @@ +class Spaceship +{ +public: + Spaceship():shields(100) + { + } + + int shields; +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60059-indent_ctor_init.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60059-indent_ctor_init.cpp new file mode 100644 index 00000000..f1b32d0e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60059-indent_ctor_init.cpp @@ -0,0 +1,18 @@ +struct MyClass +: public Foo, + private Bar { + MyClass( + int a, + int b, + int c) + : m_a(a), + m_b(b), + m_c(c) {} + + private: + int m_a, m_b, m_c; +}; + +struct TheirClass +: public Foo, + private Bar {}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60060-returns.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60060-returns.cpp new file mode 100644 index 00000000..21013963 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60060-returns.cpp @@ -0,0 +1,34 @@ +#define foo1(x) { return x; } +#define foo2(x) { return(x); } +#define foo3(x) { return (x); } +#define foo4(x) { return{x}; } +#define foo5(x) { return {x}; } +#define foo6(x) { return /**/x; } + +#define case1(x) return x +#define case2(x) return(x) +#define case3(x) return (x) +#define case4(x) return{x} +#define case5(x) return {x} +#define case6(x) return /**/x + +void foo(int x) +{ + switch (x) + { + case 1: + return 1; + case 2: + return(2); + case 3: + return (3); + case 4: + return{4}; + case 5: + return {5}; + case 6: + return /**/6; + default: + return; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60061-returns.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60061-returns.cpp new file mode 100644 index 00000000..bd199ba8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60061-returns.cpp @@ -0,0 +1,34 @@ +#define foo1(x) { return x; } +#define foo2(x) { return(x); } +#define foo3(x) { return (x); } +#define foo4(x) { return{x}; } +#define foo5(x) { return {x}; } +#define foo6(x) { return /**/x; } + +#define case1(x) return x +#define case2(x) return(x) +#define case3(x) return (x) +#define case4(x) return{x} +#define case5(x) return {x} +#define case6(x) return /**/x + +void foo(int x) +{ + switch (x) + { + case 1: + return 1; + case 2: + return(2); + case 3: + return (3); + case 4: + return{4}; + case 5: + return {5}; + case 6: + return /**/6; + default: + return; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60062-returns.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60062-returns.cpp new file mode 100644 index 00000000..1085bd72 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60062-returns.cpp @@ -0,0 +1,34 @@ +#define foo1(x) { return x; } +#define foo2(x) { return(x); } +#define foo3(x) { return (x); } +#define foo4(x) { return{x}; } +#define foo5(x) { return {x}; } +#define foo6(x) { return/**/x; } + +#define case1(x) return x +#define case2(x) return(x) +#define case3(x) return (x) +#define case4(x) return{x} +#define case5(x) return {x} +#define case6(x) return/**/x + +void foo(int x) +{ + switch (x) + { + case 1: + return 1; + case 2: + return(2); + case 3: + return (3); + case 4: + return{4}; + case 5: + return {5}; + case 6: + return/**/6; + default: + return; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60063-returns.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60063-returns.cpp new file mode 100644 index 00000000..bd199ba8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60063-returns.cpp @@ -0,0 +1,34 @@ +#define foo1(x) { return x; } +#define foo2(x) { return(x); } +#define foo3(x) { return (x); } +#define foo4(x) { return{x}; } +#define foo5(x) { return {x}; } +#define foo6(x) { return /**/x; } + +#define case1(x) return x +#define case2(x) return(x) +#define case3(x) return (x) +#define case4(x) return{x} +#define case5(x) return {x} +#define case6(x) return /**/x + +void foo(int x) +{ + switch (x) + { + case 1: + return 1; + case 2: + return(2); + case 3: + return (3); + case 4: + return{4}; + case 5: + return {5}; + case 6: + return /**/6; + default: + return; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60064-issue_3368.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60064-issue_3368.cpp new file mode 100644 index 00000000..2158086c --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60064-issue_3368.cpp @@ -0,0 +1,10 @@ +class Spaceship +{ +public: + template<class T> + Spaceship<T>():shields(100) + { + } + + int shields; +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60065-issue_3378.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60065-issue_3378.cpp new file mode 100644 index 00000000..8da9261d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60065-issue_3378.cpp @@ -0,0 +1,28 @@ +class Foo +{ +public: + int bar() + { +one: + two: + three: + four: + five: + six: + seven: + eight: + nine: + ten: + eleven: + twelve: + thirteen: + fourteen: + fifteen: + sixteen: + seventeen: + eighteen: + nineteen: + twenty: + return 0; + } +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60066-Issue_3409.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60066-Issue_3409.cpp new file mode 100644 index 00000000..969275dc --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60066-Issue_3409.cpp @@ -0,0 +1,8 @@ +namespace ns1 {
+namespace ns2 {
+const auto lamb = []() -> int
+{
+ return 42;
+};
+}
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60067-Issue_3283.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60067-Issue_3283.cpp new file mode 100644 index 00000000..9357b3b3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60067-Issue_3283.cpp @@ -0,0 +1,3 @@ +#define MACRO(a) if(!x) x=a; +#define MACRO(a) {if(!x) {x=a;}} +#define MACRO(a) {if(!x) x=a;} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60068-Issue_3428.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60068-Issue_3428.cpp new file mode 100644 index 00000000..bf1dc20b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60068-Issue_3428.cpp @@ -0,0 +1,57 @@ +void main()
+{
+ if(aaaa)
+ {
+ it = std::find_if(
+ bbbb.begin(),
+ bbbb.end(),
+ [&cccc](const auto& dddd)
+ {
+ return (eeee.ffff == iiii && !jjjj.kkkk);
+ }
+ );
+ }
+}
+
+namespace ns1 {
+
+void one()
+{
+ if(aaaa)
+ {
+ it = std::find_if(
+ bbbb.begin(),
+ bbbb.end(),
+ [&cccc](const auto& dddd)
+ {
+ return (eeee.ffff == iiii && !jjjj.kkkk);
+ }
+ );
+ }
+}
+
+namespace ns2 {
+namespace ns3 {
+const auto lamb = []() -> int
+{
+ return 42;
+};
+
+void two()
+{
+ if(aaaa)
+ {
+ it = std::find_if(
+ bbbb.begin(),
+ bbbb.end(),
+ [&cccc](const auto& dddd)
+ {
+ return (eeee.ffff == iiii && !jjjj.kkkk);
+ }
+ );
+ }
+}
+
+}
+}
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60069-Issue_3428.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60069-Issue_3428.cpp new file mode 100644 index 00000000..9b95f451 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60069-Issue_3428.cpp @@ -0,0 +1,57 @@ +void main()
+{
+ if(aaaa)
+ {
+ it = std::find_if(
+ bbbb.begin(),
+ bbbb.end(),
+ [&cccc](const auto& dddd)
+ {
+ return (eeee.ffff == iiii && !jjjj.kkkk);
+ }
+ );
+ }
+}
+
+namespace ns1 {
+
+ void one()
+ {
+ if(aaaa)
+ {
+ it = std::find_if(
+ bbbb.begin(),
+ bbbb.end(),
+ [&cccc](const auto& dddd)
+ {
+ return (eeee.ffff == iiii && !jjjj.kkkk);
+ }
+ );
+ }
+ }
+
+ namespace ns2 {
+ namespace ns3 {
+ const auto lamb = []() -> int
+ {
+ return 42;
+ };
+
+ void two()
+ {
+ if(aaaa)
+ {
+ it = std::find_if(
+ bbbb.begin(),
+ bbbb.end(),
+ [&cccc](const auto& dddd)
+ {
+ return (eeee.ffff == iiii && !jjjj.kkkk);
+ }
+ );
+ }
+ }
+
+ }
+ }
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60070-Issue_3428.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60070-Issue_3428.cpp new file mode 100644 index 00000000..fbd35533 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60070-Issue_3428.cpp @@ -0,0 +1,57 @@ +void main()
+{
+ if(aaaa)
+ {
+ it = std::find_if(
+ bbbb.begin(),
+ bbbb.end(),
+ [&cccc](const auto& dddd)
+ {
+ return (eeee.ffff == iiii && !jjjj.kkkk);
+ }
+ );
+ }
+}
+
+namespace ns1 {
+
+ void one()
+ {
+ if(aaaa)
+ {
+ it = std::find_if(
+ bbbb.begin(),
+ bbbb.end(),
+ [&cccc](const auto& dddd)
+ {
+ return (eeee.ffff == iiii && !jjjj.kkkk);
+ }
+ );
+ }
+ }
+
+namespace ns2 {
+namespace ns3 {
+ const auto lamb = []() -> int
+ {
+ return 42;
+ };
+
+ void two()
+ {
+ if(aaaa)
+ {
+ it = std::find_if(
+ bbbb.begin(),
+ bbbb.end(),
+ [&cccc](const auto& dddd)
+ {
+ return (eeee.ffff == iiii && !jjjj.kkkk);
+ }
+ );
+ }
+ }
+
+}
+}
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60071-Issue_3428.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60071-Issue_3428.cpp new file mode 100644 index 00000000..bf1dc20b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60071-Issue_3428.cpp @@ -0,0 +1,57 @@ +void main()
+{
+ if(aaaa)
+ {
+ it = std::find_if(
+ bbbb.begin(),
+ bbbb.end(),
+ [&cccc](const auto& dddd)
+ {
+ return (eeee.ffff == iiii && !jjjj.kkkk);
+ }
+ );
+ }
+}
+
+namespace ns1 {
+
+void one()
+{
+ if(aaaa)
+ {
+ it = std::find_if(
+ bbbb.begin(),
+ bbbb.end(),
+ [&cccc](const auto& dddd)
+ {
+ return (eeee.ffff == iiii && !jjjj.kkkk);
+ }
+ );
+ }
+}
+
+namespace ns2 {
+namespace ns3 {
+const auto lamb = []() -> int
+{
+ return 42;
+};
+
+void two()
+{
+ if(aaaa)
+ {
+ it = std::find_if(
+ bbbb.begin(),
+ bbbb.end(),
+ [&cccc](const auto& dddd)
+ {
+ return (eeee.ffff == iiii && !jjjj.kkkk);
+ }
+ );
+ }
+}
+
+}
+}
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60072-Issue_3428.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60072-Issue_3428.cpp new file mode 100644 index 00000000..9b95f451 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60072-Issue_3428.cpp @@ -0,0 +1,57 @@ +void main()
+{
+ if(aaaa)
+ {
+ it = std::find_if(
+ bbbb.begin(),
+ bbbb.end(),
+ [&cccc](const auto& dddd)
+ {
+ return (eeee.ffff == iiii && !jjjj.kkkk);
+ }
+ );
+ }
+}
+
+namespace ns1 {
+
+ void one()
+ {
+ if(aaaa)
+ {
+ it = std::find_if(
+ bbbb.begin(),
+ bbbb.end(),
+ [&cccc](const auto& dddd)
+ {
+ return (eeee.ffff == iiii && !jjjj.kkkk);
+ }
+ );
+ }
+ }
+
+ namespace ns2 {
+ namespace ns3 {
+ const auto lamb = []() -> int
+ {
+ return 42;
+ };
+
+ void two()
+ {
+ if(aaaa)
+ {
+ it = std::find_if(
+ bbbb.begin(),
+ bbbb.end(),
+ [&cccc](const auto& dddd)
+ {
+ return (eeee.ffff == iiii && !jjjj.kkkk);
+ }
+ );
+ }
+ }
+
+ }
+ }
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60073-Issue_3428.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60073-Issue_3428.cpp new file mode 100644 index 00000000..fbd35533 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60073-Issue_3428.cpp @@ -0,0 +1,57 @@ +void main()
+{
+ if(aaaa)
+ {
+ it = std::find_if(
+ bbbb.begin(),
+ bbbb.end(),
+ [&cccc](const auto& dddd)
+ {
+ return (eeee.ffff == iiii && !jjjj.kkkk);
+ }
+ );
+ }
+}
+
+namespace ns1 {
+
+ void one()
+ {
+ if(aaaa)
+ {
+ it = std::find_if(
+ bbbb.begin(),
+ bbbb.end(),
+ [&cccc](const auto& dddd)
+ {
+ return (eeee.ffff == iiii && !jjjj.kkkk);
+ }
+ );
+ }
+ }
+
+namespace ns2 {
+namespace ns3 {
+ const auto lamb = []() -> int
+ {
+ return 42;
+ };
+
+ void two()
+ {
+ if(aaaa)
+ {
+ it = std::find_if(
+ bbbb.begin(),
+ bbbb.end(),
+ [&cccc](const auto& dddd)
+ {
+ return (eeee.ffff == iiii && !jjjj.kkkk);
+ }
+ );
+ }
+ }
+
+}
+}
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60074-Issue_3284.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60074-Issue_3284.cpp new file mode 100644 index 00000000..cea9091e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60074-Issue_3284.cpp @@ -0,0 +1,5 @@ +Node( const Node &rhs ) = delete; +Node &operator=( const Node &rhs ) = delete; + +Node( Node &&rhs ) noexcept = delete; +Node &operator=( Node &&rhs ) noexcept = delete; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60075-Issue_3294.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60075-Issue_3294.cpp new file mode 100644 index 00000000..4f0718cc --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60075-Issue_3294.cpp @@ -0,0 +1,17 @@ +#include <vector> + +std::vector<int> x; + +void f1() +{ + int v = x.empty() + /**/ ? x.size() + /**/ : x.size(); +} + +void f2() +{ + int v = x.empty() + ? x.size() + : x.size(); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60076-indent_ctor_init.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60076-indent_ctor_init.cpp new file mode 100644 index 00000000..872961ce --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60076-indent_ctor_init.cpp @@ -0,0 +1,13 @@ +struct MyClass : public Foo, + private Bar { + MyClass(int a, int b, int c) + : m_a(a), m_b(b), + m_c(c) { + } +private: + int m_a, m_b, m_c; +}; + +struct TheirClass +: public Foo, + private Bar {}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60077-indent_ctor_init.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60077-indent_ctor_init.cpp new file mode 100644 index 00000000..acf8c268 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60077-indent_ctor_init.cpp @@ -0,0 +1,13 @@ +struct MyClass : public Foo, + private Bar { + MyClass(int a, int b, int c) + : m_a(a), m_b(b), + m_c(c) { + } +private: + int m_a, m_b, m_c; +}; + +struct TheirClass + : public Foo, + private Bar {}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60078-Issue_3505.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60078-Issue_3505.cpp new file mode 100644 index 00000000..f3225f96 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60078-Issue_3505.cpp @@ -0,0 +1,7 @@ +class Spaceship +{ +Spaceship(int a, + int b); +void init(int a, + int b); +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60079-Issue_3536.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60079-Issue_3536.cpp new file mode 100644 index 00000000..83f3e7d6 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60079-Issue_3536.cpp @@ -0,0 +1,32 @@ +struct S {}; +class C {}; + +void processStruct0( + struct S s, + int i + ); + +void processClass0( + class C c, + int i + ); + +void processStruct1( + struct S s, + int i + ); + +void processClass1( + class C c, + int i + ); + +void processStruct2( + struct S s, + int i + ); + +void processClass2( + class C c, + int i + ); diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60080-Issue_3538.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60080-Issue_3538.cpp new file mode 100644 index 00000000..bd60ace7 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60080-Issue_3538.cpp @@ -0,0 +1,13 @@ +class Alpha {}; + +class Beta +{ +public: +Beta(class Alpha alpha) : _alpha(alpha) { +} + +void init(); + +private: +class Alpha _alpha; +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60081-Issue_3546.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60081-Issue_3546.cpp new file mode 100644 index 00000000..40131205 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60081-Issue_3546.cpp @@ -0,0 +1,28 @@ +#include <stdio.h> + +class + alignas(32) + Foobar; + +int main() +{ + typedef + int + int32; + int foo, + bar, + baz; + foo = 5 + + 6 + + 7; + if (printf("%d %d", + 5 + + 6, + 7) + < 0) + { + return 1; + } + + return 0; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60082-Issue_3552.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60082-Issue_3552.cpp new file mode 100644 index 00000000..73c2e77e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60082-Issue_3552.cpp @@ -0,0 +1,9 @@ +namespace Salads +{ + class + Waldorf + { + public: + int size; + }; +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60083-Issue_3570.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60083-Issue_3570.h new file mode 100644 index 00000000..a1a2fb26 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60083-Issue_3570.h @@ -0,0 +1,25 @@ +class Foo +{ +public: + Foo + ( + ) + { + } + + Foo + ( + int x + ); + + void init + ( + ) + { + } + + void init + ( + int x + ); +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60084-Issue_3576.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60084-Issue_3576.h new file mode 100644 index 00000000..9fceffe8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60084-Issue_3576.h @@ -0,0 +1,9 @@ +class Foo : public Bar +{ +public: +void doIt + ( + ) +{ +} +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60085-Issue_3576.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60085-Issue_3576.h new file mode 100644 index 00000000..9fceffe8 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60085-Issue_3576.h @@ -0,0 +1,9 @@ +class Foo : public Bar +{ +public: +void doIt + ( + ) +{ +} +}; diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60086-indent_namespace_inner_only.h b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60086-indent_namespace_inner_only.h new file mode 100644 index 00000000..32668ed3 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60086-indent_namespace_inner_only.h @@ -0,0 +1,8 @@ +namespace out +{ +int i; +namespace in +{ + int i; +} +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60087-Issue_3550.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60087-Issue_3550.cpp new file mode 100644 index 00000000..91337c46 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60087-Issue_3550.cpp @@ -0,0 +1,9 @@ +void foo(a, b)
+{
+ bool called = false;
+
+ auto callback = [&](float value)
+ {
+ called = true;
+ };
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60088-Issue_3761.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60088-Issue_3761.cpp new file mode 100644 index 00000000..b3f8cbb5 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60088-Issue_3761.cpp @@ -0,0 +1,14 @@ +void f(void (*g)()) +{ +} + +int main() +{ + f([]() { + int x = 1; + switch (x) { + case 1: + break; + } + }); +} diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60089-Issue_3863.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60089-Issue_3863.cpp new file mode 100644 index 00000000..4163ee8e --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60089-Issue_3863.cpp @@ -0,0 +1,3 @@ +void MyClass::myFn()
+{
+}
\ No newline at end of file diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60090-Issue_3863_2.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60090-Issue_3863_2.cpp new file mode 100644 index 00000000..f91c6547 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60090-Issue_3863_2.cpp @@ -0,0 +1,3 @@ +void MyClass::myFn()
+{
+}
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60091-Issue_3863_3.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60091-Issue_3863_3.cpp new file mode 100644 index 00000000..f2885f39 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/cpp/60091-Issue_3863_3.cpp @@ -0,0 +1,4 @@ +void MyClass::myFn()
+{
+}
+
|