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

chore: check width in setRowSlice and setColSlice #174

Merged
merged 1 commit into from
Jun 23, 2023

Conversation

rootulp
Copy link
Collaborator

@rootulp rootulp commented Jun 19, 2023

Closes #169

@rootulp rootulp requested a review from evan-forbes June 19, 2023 17:21
@rootulp rootulp self-assigned this Jun 19, 2023
@codecov
Copy link

codecov bot commented Jun 19, 2023

Codecov Report

Merging #174 (c985273) into master (6515446) will increase coverage by 0.13%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #174      +/-   ##
==========================================
+ Coverage   81.43%   81.57%   +0.13%     
==========================================
  Files           7        7              
  Lines         528      532       +4     
==========================================
+ Hits          430      434       +4     
  Misses         58       58              
  Partials       40       40              
Impacted Files Coverage Δ
datasquare.go 93.86% <0.00%> (+0.15%) ⬆️

@rootulp rootulp requested a review from staheri14 June 22, 2023 17:45
@@ -163,6 +166,9 @@ func (ds *dataSquare) setColSlice(x uint, y uint, newCol [][]byte) error {
return errors.New("invalid chunk size")
}
}
if x+uint(len(newCol)) > ds.width {
return fmt.Errorf("cannot set col slice at (%d, %d) of length %d: because it would exceed the data square width %d", x, y, len(newCol), ds.width)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the codecov still complains? As far as I can say, your tests cover this line 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

idk, it look like the test does cover this

Screenshot 2023-06-23 at 2 31 37 PM

@rootulp rootulp merged commit f0b3545 into celestiaorg:master Jun 23, 2023
3 of 5 checks passed
@rootulp rootulp deleted the rp/check-dimensions branch June 23, 2023 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Position and dimensions of row/column slice is not checked
3 participants