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

Check if observations sorted before taking median #169

Merged
merged 1 commit into from
Oct 20, 2022

Conversation

krebernisak
Copy link
Collaborator

No description provided.

@krebernisak krebernisak temporarily deployed to integration October 17, 2022 16:28 Inactive
@krebernisak krebernisak temporarily deployed to integration October 17, 2022 16:37 Inactive
@krebernisak krebernisak temporarily deployed to integration October 17, 2022 16:42 Inactive
@github-actions
Copy link

github-actions bot commented Oct 17, 2022

Smoke Test Results

1 tests   1 ✔️  6m 39s ⏱️
1 suites  0 💤
1 files    0

Results for commit f8fbcd8.

♻️ This comment has been updated with latest results.

Comment on lines +124 to +130
// Check if the report contains sorted observations
_less := func(i, j int) bool {
return oo[i].Cmp(oo[j]) < 0
}
sorted := sort.SliceIsSorted(oo, _less)
if !sorted {
return nil, errors.New("observations not sorted")
Copy link
Collaborator

Choose a reason for hiding this comment

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

test case? otherwise, this looks great!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, but it's more involved than adding a simple test case (BuildReport always sorts, custom fuzzer could be built) so I'll defer to this GitHub Issue for now: #171

@krebernisak krebernisak temporarily deployed to integration October 19, 2022 20:03 Inactive
@krebernisak krebernisak temporarily deployed to integration October 19, 2022 20:09 Inactive
@krebernisak krebernisak merged commit e480d54 into develop Oct 20, 2022
@krebernisak krebernisak deleted the fix/observations-sort branch October 20, 2022 11:45
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.

2 participants