Skip to content

Commit

Permalink
fix: update all tests that breaks in new parsing of comments
Browse files Browse the repository at this point in the history
  • Loading branch information
NiumXp committed Nov 15, 2023
1 parent 2869b27 commit c4fb07e
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 71 deletions.
6 changes: 3 additions & 3 deletions tests/rules/samples/ok_func_classic.out
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<TAB> <COMMENT=// toototo> <NEWLINE>
ok_func_classic.c - IsComment In "GlobalScope" from "None" line 4":
<TAB> <MULT_COMMENT=/*
** aallo
**
*/> <NEWLINE>
** aallo
**
*/> <NEWLINE>
ok_func_classic.c - IsEmptyLine In "GlobalScope" from "None" line 8":
<NEWLINE>
ok_func_classic.c - IsFuncDeclaration In "GlobalScope" from "None" line 9":
Expand Down
94 changes: 47 additions & 47 deletions tests/rules/samples/test_file_0907_2.out
Original file line number Diff line number Diff line change
Expand Up @@ -160,23 +160,23 @@
<NEWLINE>
test_file_0907_2.h - IsComment In "GlobalScope" from "None" line 84":
<MULT_COMMENT=/*
** # define Button1MotionMask (1L<<8)
** # define Button2MotionMask (1L<<9)
** # define Button3MotionMask (1L<<10)
** # define Button4MotionMask (1L<<11)
** # define Button5MotionMask (1L<<12)
** # define ButtonMotionMask (1L<<13)
** # define KeymapStateMask (1L<<14)
** # define ExposureMask (1L<<15)
** # define VisibilityChangeMask (1L<<16)
** # define StructureNotifyMask (1L<<17)
** # define ResizeRedirectMask (1L<<18)
** # define SubstructureNotifyMask (1L<<19)
** # define SubstructureRedirectMask (1L<<20)
** # define FocusChangeMask (1L<<21)
** # define PropertyChangeMask (1L<<22)
** # define ColormapChangeMask (1L<<23)
** # define OwnerGrabButtonMask (1L<<24)
** # define Button1MotionMask (1L<<8)
** # define Button2MotionMask (1L<<9)
** # define Button3MotionMask (1L<<10)
** # define Button4MotionMask (1L<<11)
** # define Button5MotionMask (1L<<12)
** # define ButtonMotionMask (1L<<13)
** # define KeymapStateMask (1L<<14)
** # define ExposureMask (1L<<15)
** # define VisibilityChangeMask (1L<<16)
** # define StructureNotifyMask (1L<<17)
** # define ResizeRedirectMask (1L<<18)
** # define SubstructureNotifyMask (1L<<19)
** # define SubstructureRedirectMask (1L<<20)
** # define FocusChangeMask (1L<<21)
** # define PropertyChangeMask (1L<<22)
** # define ColormapChangeMask (1L<<23)
** # define OwnerGrabButtonMask (1L<<24)
*/> <NEWLINE>
test_file_0907_2.h - IsEmptyLine In "GlobalScope" from "None" line 103":
<NEWLINE>
Expand All @@ -192,37 +192,37 @@
<NEWLINE>
test_file_0907_2.h - IsComment In "GlobalScope" from "None" line 109":
<MULT_COMMENT=/*
** # define MotionNotify 6
** # define EnterNotify 7
** # define LeaveNotify 8
** # define FocusIn 9
** # define FocusOut 10
** # define KeymapNotify 11
** # define Expose 12
** # define GraphicsExpose 13
** # define NoExpose 14
** # define MotionNotify 6
** # define EnterNotify 7
** # define LeaveNotify 8
** # define FocusIn 9
** # define FocusOut 10
** # define KeymapNotify 11
** # define Expose 12
** # define GraphicsExpose 13
** # define NoExpose 14
** # define VisibilityNotify 15
** # define CreateNotify 16
** # define DestroyNotify 17
** # define UnmapNotify 18
** # define MapNotify 19
** # define MapRequest 20
** # define ReparentNotify 21
** # define ConfigureNotify 22
** # define ConfigureRequest 23
** # define GravityNotify 24
** # define ResizeRequest 25
** # define CirculateNotify 26
** # define CirculateRequest 27
** # define PropertyNotify 28
** # define SelectionClear 29
** # define SelectionRequest 30
** # define SelectionNotify 31
** # define ColormapNotify 32
** # define ClientMessage 33
** # define MappingNotify 34
** # define GenericEvent 35
** # define LASTEvent 36
** # define CreateNotify 16
** # define DestroyNotify 17
** # define UnmapNotify 18
** # define MapNotify 19
** # define MapRequest 20
** # define ReparentNotify 21
** # define ConfigureNotify 22
** # define ConfigureRequest 23
** # define GravityNotify 24
** # define ResizeRequest 25
** # define CirculateNotify 26
** # define CirculateRequest 27
** # define PropertyNotify 28
** # define SelectionClear 29
** # define SelectionRequest 30
** # define SelectionNotify 31
** # define ColormapNotify 32
** # define ClientMessage 33
** # define MappingNotify 34
** # define GenericEvent 35
** # define LASTEvent 36
*/> <NEWLINE>
test_file_0907_2.h - IsEmptyLine In "GlobalScope" from "None" line 142":
<NEWLINE>
Expand Down
4 changes: 2 additions & 2 deletions tests/rules/samples/test_file_0907_3.out
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<TAB> <IDENTIFIER=fm_fd> <SPACE> <ASSIGN> <SPACE> <MINUS> <CONSTANT=1> <SEMI_COLON> <TAB>
test_file_0907_3.c - IsComment In "Function" from "GlobalScope" line 19":
<MULT_COMMENT=/* Shut up stupid "may be used uninitialized" GCC
warning. (not needed w/clang) */> <NEWLINE>
warning. (not needed w/clang) */> <NEWLINE>
test_file_0907_3.c - IsAssignation In "Function" from "GlobalScope" line 21":
<TAB> <IDENTIFIER=showexit> <SPACE> <ASSIGN> <SPACE> <CONSTANT=0> <SEMI_COLON> <NEWLINE>
test_file_0907_3.c - IsEmptyLine In "Function" from "GlobalScope" line 22":
Expand Down Expand Up @@ -141,7 +141,7 @@
<NEWLINE>
test_file_0907_3.c - IsComment In "Function" from "GlobalScope" line 69":
<TAB> <MULT_COMMENT=/*if (pflg)
playback(fscript);*/> <NEWLINE>
playback(fscript);*/> <NEWLINE>
test_file_0907_3.c - IsEmptyLine In "Function" from "GlobalScope" line 71":
<NEWLINE>
test_file_0907_3.c - IsControlStatement In "Function" from "GlobalScope" line 72":
Expand Down
32 changes: 16 additions & 16 deletions tests/rules/samples/test_file_1012_3.out
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
test_file_1012_3.h - IsComment In "GlobalScope" from "None" line 20":
<MULT_COMMENT=/*
** Duplicates the provided array to initialize the environnement.
** @param char** environ An array of strings that will be used as environnem
** @param char** environ An array of strings that will be used as environnem
** ent variables. These are not checked for invalid syntax.
** @param char** The resulting environnement, or NULL in case of error.
** @param char** The resulting environnement, or NULL in case of error.
*/> <NEWLINE>
test_file_1012_3.h - IsEmptyLine In "GlobalScope" from "None" line 26":
<NEWLINE>
Expand All @@ -62,8 +62,8 @@
test_file_1012_3.h - IsComment In "GlobalScope" from "None" line 35":
<MULT_COMMENT=/*
** Fetches the value of an environnement variable.
** @param const char* name The name of the variable.
** @return char* An allocated copy of the variable's value.
** @param const char* name The name of the variable.
** @return char* An allocated copy of the variable's value.
*/> <NEWLINE>
test_file_1012_3.h - IsEmptyLine In "GlobalScope" from "None" line 40":
<NEWLINE>
Expand All @@ -74,13 +74,13 @@
test_file_1012_3.h - IsComment In "GlobalScope" from "None" line 43":
<MULT_COMMENT=/*
** Sets an environnement variable.
** @param char* value A string formated as "name=value".
** This string is NOT checked for invalid syntax.
** This exact pointer is stored internally, and should notbe modified or freed
** @param char* value A string formated as "name=value".
** This string is NOT checked for invalid syntax.
** This exact pointer is stored internally, and should notbe modified or freed
** afterward.
** @return bool
** true OK;
** false Error;
** true OK;
** false Error;
*/> <NEWLINE>
test_file_1012_3.h - IsEmptyLine In "GlobalScope" from "None" line 53":
<NEWLINE>
Expand All @@ -91,12 +91,12 @@
test_file_1012_3.h - IsComment In "GlobalScope" from "None" line 56":
<MULT_COMMENT=/*
** Sets an environnement variable.
** @param const char* name The name of the variable to set.
** This name is NOT checked for invalid caracters, except for '='.
** @param const char* value The value to set.
** @param const char* name The name of the variable to set.
** This name is NOT checked for invalid caracters, except for '='.
** @param const char* value The value to set.
** return bool
** true OK
** false Error
** true OK
** false Error
*/> <NEWLINE>
test_file_1012_3.h - IsEmptyLine In "GlobalScope" from "None" line 65":
<NEWLINE>
Expand All @@ -108,8 +108,8 @@
<MULT_COMMENT=/*
** Checks the validity of an environnement variable's name.
** The special name '?' is considered valid.
** @param const char* name The name to validate
** @return char* A pointer to the first invalid character, else a pointer to
** @param const char* name The name to validate
** @return char* A pointer to the first invalid character, else a pointer to
** the null terminator.
*/> <NEWLINE>
test_file_1012_3.h - IsEmptyLine In "GlobalScope" from "None" line 75":
Expand Down
4 changes: 2 additions & 2 deletions tests/rules/samples/test_file_210128.out
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<COMMENT=// comment in fun> <NEWLINE>
test_file_210128.c - IsComment In "Function" from "GlobalScope" line 6":
<TAB> <MULT_COMMENT=/*
Multi line comment in function body
Multi line comment in function body

*/> <NEWLINE>
*/> <NEWLINE>
test_file_210128.c - IsAssignation In "Function" from "GlobalScope" line 10":
<TAB> <IDENTIFIER=num1> <SPACE> <ASSIGN> <SPACE> <CONSTANT=25> <SEMI_COLON> <NEWLINE>
test_file_210128.c - IsAssignation In "Function" from "GlobalScope" line 11":
Expand Down
2 changes: 1 addition & 1 deletion tests/tokenizer/samples/ok/ok_test_22.tokens
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<MULT_COMMENT=/*\**/><NEWLINE>
<MULT_COMMENT=/*\*/><NEWLINE>
<NEWLINE>
<INT><SPACE><IDENTIFIER=main><LPARENTHESIS><RPARENTHESIS><SPACE><LBRACE><NEWLINE>
<TAB><INT><SPACE><IDENTIFIER=a><SPACE><ASSIGN><SPACE><CONSTANT=1><SEMI_COLON><NEWLINE>
Expand Down

0 comments on commit c4fb07e

Please sign in to comment.