Skip to content

Commit

Permalink
Add more unit tests for linter tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LoadingByte committed May 25, 2018
1 parent 6fdc136 commit dd85ef0
Show file tree
Hide file tree
Showing 25 changed files with 143 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
testing
testTempsReadBeforeWritten

self
test: #smallLintTempsReadBeforeWritten
on: { SLTestTempsReadBeforeWritten }
expectedResults: { 2 }.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
testing
testUnclassifiedMethods

self
test: #smallLintUnclassifiedMethods
on: { SLTestUnclassifiedMethods }
expectedResults: { 2 }.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
testing
testUncommonMessageSend

self
test: #smallLintUncommonMessageSend
on: { SLTestUncommonMessageSend }
expectedResults: { 3 }.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"testLiteralArrayContainsComma" : "LG 5/22/2018 23:01",
"testLiteralValuesSpelling" : "Lars Seifert 5/4/2018 15:36",
"testLongMethods" : "LG 5/22/2018 23:13",
"testMagicNumbers" : "BD 5/16/2018 21:43",
"testMagicNumbers" : "fm 5/24/2018 19:50",
"testMethodModifierFinal" : "LG 5/24/2018 09:46",
"testMethodModifierOverride" : "LG 5/24/2018 09:45",
"testMethodModifierSuper" : "LG 5/24/2018 10:06",
Expand All @@ -57,4 +57,7 @@
"testSuperSendsNew" : "LG 5/24/2018 12:29",
"testTempVarOverridesInstVarRule" : "LG 5/18/2018 08:56",
"testTemporaryVariableCapitalization" : "LG 5/24/2018 14:33",
"testTempsReadBeforeWritten" : "fm 5/24/2018 19:29",
"testUnclassifiedMethods" : "fm 5/25/2018 08:26",
"testUncommonMessageSend" : "fm 5/25/2018 08:52",
"testYourselfNotUsed" : "Lars Seifert 5/24/2018 14:10" } }
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],
"classvars" : [
],
"commentStamp" : "LG 5/24/2018 11:06",
"commentStamp" : "",
"instvars" : [
],
"name" : "SLTestNoClassComment01",
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
as yet unclassified
doSomethingBad

| a b c d e |
a := 0.
c := 1.
d := 2.
^ a + b + c + d + e
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
as yet unclassified
doSomethingBad2

| a b |
a := 0.
^ a + b
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
as yet unclassified
doSomethingWithoutAnnoyingTheLinter

| a b |
a := 0.
b := 1.
^ a + b
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"class" : {
},
"instance" : {
"doSomethingBad" : "fm 5/24/2018 19:29",
"doSomethingBad2" : "fm 5/24/2018 19:28",
"doSomethingWithoutAnnoyingTheLinter" : "fm 5/24/2018 19:23" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"category" : "SwaLint-Tests-Data",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
],
"name" : "SLTestTempsReadBeforeWritten",
"pools" : [
],
"super" : "Object",
"type" : "normal" }
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
private
classifiedMethod
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
as yet unclassified
unclassifiedMethod
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
as yet unclassified
unclassifiedMethod2
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"class" : {
},
"instance" : {
"classifiedMethod" : "fm 5/24/2018 20:04",
"unclassifiedMethod" : "fm 5/24/2018 20:04",
"unclassifiedMethod2" : "fm 5/24/2018 20:04" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"category" : "SwaLint-Tests-Data",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
],
"name" : "SLTestUnclassifiedMethods",
"pools" : [
],
"super" : "Object",
"type" : "normal" }
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
as yet unclassified
doCommonMessageSend1

| tmp |
tmp goodSelector.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
as yet unclassified
doCommonMessageSend2

self goodSelector.
self goodSelector.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
as yet unclassified
doUncommonMessageSend1

"Besides super: self, thisContext, true, false, nil"
1 super.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
as yet unclassified
doUncommonMessageSend2

self goodSelector
self goodSelector
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
as yet unclassified
doUncommonMessageSend3

| tmp |
tmp BadSelector.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"class" : {
},
"instance" : {
"doCommonMessageSend1" : "fm 5/25/2018 08:51",
"doCommonMessageSend2" : "fm 5/25/2018 08:50",
"doUncommonMessageSend1" : "fm 5/25/2018 08:38",
"doUncommonMessageSend2" : "fm 5/25/2018 08:48",
"doUncommonMessageSend3" : "fm 5/25/2018 08:47" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"category" : "SwaLint-Tests-Data",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
],
"name" : "SLTestUncommonMessageSend",
"pools" : [
],
"super" : "Object",
"type" : "normal" }

0 comments on commit dd85ef0

Please sign in to comment.