Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

function: make array_length not fail with literal null #767

Merged
merged 2 commits into from
Jun 24, 2019

Conversation

erizocosmico
Copy link
Contributor

Fixes #766

@erizocosmico erizocosmico requested a review from a team June 24, 2019 10:55
@ajnavarro
Copy link
Contributor

@erizocosmico we need to change tests to handle the new no-errors case:

--- FAIL: TestArrayLength (0.00s)
    --- PASS: TestArrayLength/array_is_nil (0.00s)
    --- PASS: TestArrayLength/array_is_not_of_right_type (0.00s)
    --- PASS: TestArrayLength/array_is_ok (0.00s)
    require.go:248: 
        	Error Trace:	arraylength_test.go:44
        	Error:      	An error is expected but got nil.
        	Test:       	TestArrayLength

Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
@erizocosmico
Copy link
Contributor Author

Fixed

@ajnavarro ajnavarro merged commit 8702d43 into src-d:master Jun 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ARRAY_LENGTH is not handling null values well
4 participants