Skip to content
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

Fix #560 & #561 #567

Merged
merged 2 commits into from
Jan 7, 2018
Merged

Fix #560 & #561 #567

merged 2 commits into from
Jan 7, 2018

Conversation

st0012
Copy link
Member

@st0012 st0012 commented Jan 7, 2018

This closes #560 and closes #561

@st0012 st0012 added this to the version 0.1.7 milestone Jan 7, 2018
@st0012 st0012 self-assigned this Jan 7, 2018
@st0012 st0012 requested a review from hachi8833 January 7, 2018 06:47
@ghost ghost added the in progress label Jan 7, 2018
@codecov
Copy link

codecov bot commented Jan 7, 2018

Codecov Report

Merging #567 into master will decrease coverage by 0.04%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #567      +/-   ##
==========================================
- Coverage   82.67%   82.62%   -0.05%     
==========================================
  Files          53       53              
  Lines        6995     6999       +4     
==========================================
  Hits         5783     5783              
- Misses        967      969       +2     
- Partials      245      247       +2
Impacted Files Coverage Δ
compiler/bytecode/statement_generation.go 84.12% <0%> (-1.36%) ⬇️
compiler/bytecode/expression_generation.go 72.06% <0%> (-0.82%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1cdf3e8...567df5a. Read the comment docs.

@hachi8833
Copy link
Member

#561 still needs fix. The following is an evaluation test for that:

func TestEmptyCodeEvaluation(t *testing.T) {
	tests := []struct {
		input    string
		expected string
	}{
		{``, ""},
		{`
`, ""},
	}

	for i, tt := range tests {
		v := initTestVM()
		evaluated := v.testEval(t, tt.input, getFilename())

		if isError(evaluated) {
			t.Fatalf("got Error: %s", evaluated.(*Error).message)
		}

		verifyExpected(t, i, evaluated, tt.expected)
		v.checkCFP(t, i, 0)
		v.checkSP(t, i, 1)
	}
}

Copy link
Member

@hachi8833 hachi8833 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#561 still needs fix

@st0012
Copy link
Member Author

st0012 commented Jan 7, 2018

@hachi8833 I've tried that. We can't test that in current testing approach, because the parser will have different mode and behavior under test environment. And the issue you mentioned is a test-mode-only issue.

@hachi8833
Copy link
Member

Got it

@st0012
Copy link
Member Author

st0012 commented Jan 7, 2018

@hachi8833 Do you approve this PR?

@hachi8833 hachi8833 merged commit 759c0ca into master Jan 7, 2018
@ghost ghost removed the in progress label Jan 7, 2018
@st0012 st0012 deleted the fix-#560 branch January 8, 2018 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Empty files causes a panic Leading ; causes a panic
2 participants