Skip to content

cleanup: Split large test + delete scratchpad test. #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions test/scip/testdata/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tmp*
11 changes: 11 additions & 0 deletions test/scip/testdata/args.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# typed: true

def args(x, y)
z = x + y
if x == 2
z += y
else
z += x
end
z
end
26 changes: 26 additions & 0 deletions test/scip/testdata/args.snapshot.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# typed: true

def args(x, y)
#^^^^^^^^^^^^^^ definition scip-ruby gem TODO TODO args().
#^^^^^^^^^^ definition scip-ruby gem TODO TODO <static-init>().
# ^ definition local 1~#2634721084
# ^ definition local 2~#2634721084
z = x + y
# ^ definition local 3~#2634721084
# ^ reference local 1~#2634721084
# ^ reference local 2~#2634721084
if x == 2
# ^ reference local 1~#2634721084
z += y
# ^ reference local 3~#2634721084
# ^ reference (write) local 3~#2634721084
# ^ reference local 2~#2634721084
else
z += x
# ^ reference local 3~#2634721084
# ^ reference (write) local 3~#2634721084
# ^ reference local 1~#2634721084
end
z
# ^ reference local 3~#2634721084
end
9 changes: 9 additions & 0 deletions test/scip/testdata/arrays.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# typed: true

def arrays(a, i)
a[0] = 0
a[1] = a[2]
a[i] = a[i + 1]
b = a[2..-1]
a << a[-1]
end
24 changes: 24 additions & 0 deletions test/scip/testdata/arrays.snapshot.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# typed: true

def arrays(a, i)
#^^^^^^^^^^^^^^^^ definition scip-ruby gem TODO TODO arrays().
#^^^^^^^^ definition scip-ruby gem TODO TODO <static-init>().
# ^ definition local 1~#513334479
# ^ definition local 2~#513334479
a[0] = 0
# ^ reference local 1~#513334479
a[1] = a[2]
# ^ reference local 1~#513334479
# ^ reference local 1~#513334479
a[i] = a[i + 1]
# ^ reference local 1~#513334479
# ^ reference local 2~#513334479
# ^ reference local 1~#513334479
# ^ reference local 2~#513334479
b = a[2..-1]
# ^ definition local 3~#513334479
# ^ reference local 1~#513334479
a << a[-1]
# ^ reference local 1~#513334479
# ^ reference local 1~#513334479
end
11 changes: 11 additions & 0 deletions test/scip/testdata/functions.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# typed: true

def globalFn1()
x = 10
x
end

def globalFn2()
x = globalFn1()
end

19 changes: 19 additions & 0 deletions test/scip/testdata/functions.snapshot.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# typed: true

def globalFn1()
#^^^^^^^^^^^^^^^ definition scip-ruby gem TODO TODO globalFn1().
#^^^^^^^^^ definition scip-ruby gem TODO TODO <static-init>().
x = 10
# ^ definition local 1~#3846536873
x
# ^ reference local 1~#3846536873
end

def globalFn2()
#^^^^^^^^^^^^^^^ definition scip-ruby gem TODO TODO globalFn2().
x = globalFn1()
# ^ definition local 1~#3796204016
# ^^^^^^^^^^^^^^^ reference local 1~#3796204016
# ^^^^^^^^^ reference scip-ruby gem TODO TODO globalFn1().
end

7 changes: 7 additions & 0 deletions test/scip/testdata/hashes.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# typed: true

def hashes(h, k)
h["hello"] = "world"
old = h["world"]
h[k] = h[old]
end
18 changes: 18 additions & 0 deletions test/scip/testdata/hashes.snapshot.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# typed: true

def hashes(h, k)
#^^^^^^^^^^^^^^^^ definition scip-ruby gem TODO TODO hashes().
#^^^^^^ definition scip-ruby gem TODO TODO <static-init>().
# ^ definition local 1~#1685166589
# ^ definition local 2~#1685166589
h["hello"] = "world"
# ^ reference local 1~#1685166589
old = h["world"]
# ^^^ definition local 3~#1685166589
# ^ reference local 1~#1685166589
h[k] = h[old]
# ^ reference local 1~#1685166589
# ^ reference local 2~#1685166589
# ^ reference local 1~#1685166589
# ^^^ reference local 3~#1685166589
end
13 changes: 0 additions & 13 deletions test/scip/testdata/s.rb

This file was deleted.

22 changes: 0 additions & 22 deletions test/scip/testdata/s.snapshot.rb

This file was deleted.

36 changes: 0 additions & 36 deletions test/scip/testdata/syntax.rb

This file was deleted.

83 changes: 0 additions & 83 deletions test/scip/testdata/syntax.snapshot.rb

This file was deleted.