move nil inspect into methods test
@@ -30,24 +30,6 @@ func TestEvalNil(t *testing.T) {
v.checkSP(t, 0, 1)
}
-func TestNilInspect(t *testing.T) {
- tests := []struct {
- input string
- expected string
- }{
- {`nil.to_s`, ""},
- {`nil.inspect`, "nil"},
- }
-
- for i, tt := range tests {
- v := initTestVM()
- evaluated := v.testEval(t, tt.input, getFilename())
- VerifyExpected(t, i, evaluated, tt.expected)
- v.checkCFP(t, i, 0)
- v.checkSP(t, i, 1)
- }
-}
-
func TestNullComparisonOperation(t *testing.T) {
tests := []struct {
input string
@@ -182,3 +164,21 @@ func TestNullIsNilMethodFail(t *testing.T) {
v.checkSP(t, i, 1)
}
}
+
+func TestNilInspect(t *testing.T) {
+ tests := []struct {
+ input string
+ expected string
+ }{
+ {`nil.to_s`, ""},
+ {`nil.inspect`, "nil"},
+ }
+
+ for i, tt := range tests {
+ v := initTestVM()
+ evaluated := v.testEval(t, tt.input, getFilename())
+ VerifyExpected(t, i, evaluated, tt.expected)
+ v.checkCFP(t, i, 0)
+ v.checkSP(t, i, 1)
+ }
+}
