Skip to content

Commit f21398c

Browse files
committed
changed the name of one of the constants for a better test case
1 parent 445c420 commit f21398c

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

ruby/ql/test/library-tests/ast/Ast.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,8 +1362,8 @@ constants/constants.rb:
13621362
# 47| getStmt: [ClassDeclaration] ClassB
13631363
# 47| getSuperclassExpr: [ConstantReadAccess] Base
13641364
# 48| getStmt: [AssignExpr] ... = ...
1365-
# 48| getAnOperand/getLeftOperand: [ConstantAssignment] FOURTY_FOUR
1366-
# 48| getAnOperand/getRightOperand: [IntegerLiteral] 44
1365+
# 48| getAnOperand/getLeftOperand: [ConstantAssignment] FOURTY_ONE
1366+
# 48| getAnOperand/getRightOperand: [IntegerLiteral] 41
13671367
# 52| getStmt: [ModuleDeclaration] ModuleA
13681368
# 53| getStmt: [AssignExpr] ... = ...
13691369
# 53| getAnOperand/getLeftOperand: [ConstantAssignment] FOURTY_FOUR

ruby/ql/test/library-tests/ast/ValueText.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
| constants/constants.rb:36:18:36:19 | 43 | 43 |
7979
| constants/constants.rb:39:30:39:33 | 1024 | 1024 |
8080
| constants/constants.rb:41:6:41:31 | MAX_SIZE | 1024 |
81-
| constants/constants.rb:48:19:48:20 | 44 | 44 |
81+
| constants/constants.rb:48:18:48:19 | 41 | 41 |
8282
| constants/constants.rb:53:17:53:29 | "fourty-four" | fourty-four |
8383
| constants/constants.rb:55:21:55:31 | FOURTY_FOUR | 44 |
8484
| constants/constants.rb:55:21:55:31 | FOURTY_FOUR | fourty-four |

ruby/ql/test/library-tests/ast/constants/constants.expected

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ constantAccess
4040
| constants.rb:46:8:46:14 | ModuleA | read | ModuleA | ConstantReadAccess |
4141
| constants.rb:47:3:49:5 | ClassB | write | ClassB | ClassDeclaration |
4242
| constants.rb:47:18:47:21 | Base | read | Base | ConstantReadAccess |
43-
| constants.rb:48:5:48:15 | FOURTY_FOUR | write | FOURTY_FOUR | ConstantAssignment |
43+
| constants.rb:48:5:48:14 | FOURTY_ONE | write | FOURTY_ONE | ConstantAssignment |
4444
| constants.rb:52:1:59:3 | ModuleA | write | ModuleA | ModuleDeclaration |
4545
| constants.rb:53:3:53:13 | FOURTY_FOUR | write | FOURTY_FOUR | ConstantAssignment |
4646
| constants.rb:54:3:58:5 | ClassB | write | ClassB | ClassDeclaration |
@@ -67,8 +67,8 @@ getConst
6767
| constants.rb:2:5:4:7 | ModuleA::ClassA | CONST_A | constants.rb:3:19:3:27 | "const_a" |
6868
| constants.rb:31:1:33:3 | ModuleA::ClassD | FOURTY_TWO | constants.rb:32:16:32:17 | 42 |
6969
| constants.rb:35:1:37:3 | ModuleA::ModuleC | FOURTY_THREE | constants.rb:36:18:36:19 | 43 |
70-
| constants.rb:54:3:58:5 | ModuleA::ModuleB::ClassB | FOURTY_FOUR | constants.rb:48:19:48:20 | 44 |
7170
| constants.rb:54:3:58:5 | ModuleA::ModuleB::ClassB | FOURTY_FOUR | constants.rb:56:19:56:20 | 44 |
71+
| constants.rb:54:3:58:5 | ModuleA::ModuleB::ClassB | FOURTY_ONE | constants.rb:48:18:48:19 | 41 |
7272
| constants.rb:62:3:64:5 | Mod1::Mod3 | FOURTY_FIVE | constants.rb:63:19:63:20 | 45 |
7373
| constants.rb:70:3:72:5 | Mod1::Mod3::Mod5 | FOURTY_SIX | constants.rb:71:18:71:19 | 46 |
7474
| file://:0:0:0:0 | Object | GREETING | constants.rb:17:12:17:64 | ... + ... |
@@ -83,8 +83,8 @@ lookupConst
8383
| constants.rb:31:1:33:3 | ModuleA::ClassD | FOURTY_TWO | constants.rb:32:16:32:17 | 42 |
8484
| constants.rb:31:1:33:3 | ModuleA::ClassD | GREETING | constants.rb:17:12:17:64 | ... + ... |
8585
| constants.rb:35:1:37:3 | ModuleA::ModuleC | FOURTY_THREE | constants.rb:36:18:36:19 | 43 |
86-
| constants.rb:54:3:58:5 | ModuleA::ModuleB::ClassB | FOURTY_FOUR | constants.rb:48:19:48:20 | 44 |
8786
| constants.rb:54:3:58:5 | ModuleA::ModuleB::ClassB | FOURTY_FOUR | constants.rb:56:19:56:20 | 44 |
87+
| constants.rb:54:3:58:5 | ModuleA::ModuleB::ClassB | FOURTY_ONE | constants.rb:48:18:48:19 | 41 |
8888
| constants.rb:54:3:58:5 | ModuleA::ModuleB::ClassB | GREETING | constants.rb:17:12:17:64 | ... + ... |
8989
| constants.rb:62:3:64:5 | Mod1::Mod3 | FOURTY_FIVE | constants.rb:63:19:63:20 | 45 |
9090
| constants.rb:70:3:72:5 | Mod1::Mod3::Mod5 | FOURTY_SIX | constants.rb:71:18:71:19 | 46 |
@@ -96,10 +96,8 @@ constantValue
9696
| constants.rb:41:6:41:31 | MAX_SIZE | constants.rb:39:30:39:33 | 1024 |
9797
| constants.rb:43:6:43:13 | GREETING | constants.rb:17:12:17:64 | ... + ... |
9898
| constants.rb:44:6:44:15 | GREETING | constants.rb:17:12:17:64 | ... + ... |
99-
| constants.rb:55:21:55:31 | FOURTY_FOUR | constants.rb:48:19:48:20 | 44 |
10099
| constants.rb:55:21:55:31 | FOURTY_FOUR | constants.rb:53:17:53:29 | "fourty-four" |
101100
| constants.rb:55:21:55:31 | FOURTY_FOUR | constants.rb:56:19:56:20 | 44 |
102-
| constants.rb:57:21:57:31 | FOURTY_FOUR | constants.rb:48:19:48:20 | 44 |
103101
| constants.rb:57:21:57:31 | FOURTY_FOUR | constants.rb:53:17:53:29 | "fourty-four" |
104102
| constants.rb:57:21:57:31 | FOURTY_FOUR | constants.rb:56:19:56:20 | 44 |
105103
| constants.rb:65:19:65:35 | FOURTY_FIVE | constants.rb:63:19:63:20 | 45 |
@@ -120,7 +118,7 @@ constantWriteAccessQualifiedName
120118
| constants.rb:39:1:39:26 | MAX_SIZE | ModuleA::ModuleB::MAX_SIZE |
121119
| constants.rb:46:1:50:3 | ModuleB | ModuleA::ModuleB |
122120
| constants.rb:47:3:49:5 | ClassB | ModuleA::ModuleB::ClassB |
123-
| constants.rb:48:5:48:15 | FOURTY_FOUR | ModuleA::ModuleB::ClassB::FOURTY_FOUR |
121+
| constants.rb:48:5:48:14 | FOURTY_ONE | ModuleA::ModuleB::ClassB::FOURTY_ONE |
124122
| constants.rb:52:1:59:3 | ModuleA | ModuleA |
125123
| constants.rb:53:3:53:13 | FOURTY_FOUR | ModuleA::FOURTY_FOUR |
126124
| constants.rb:54:3:58:5 | ClassB | ModuleA::ModuleB::ClassB |

ruby/ql/test/library-tests/ast/constants/constants.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ module ModuleA::ModuleC
4545

4646
module ModuleA::ModuleB
4747
class ClassB < Base
48-
FOURTY_FOUR = 44
48+
FOURTY_ONE = 41
4949
end
5050
end
5151

0 commit comments

Comments
 (0)