validate checks the referential integrity ensures len(keys) == len(containers), recurses and checks each container type
()
| 804 | // validate checks the referential integrity |
| 805 | // ensures len(keys) == len(containers), recurses and checks each container type |
| 806 | func (ra *roaringArray) validate() error { |
| 807 | if !ra.checkKeysSorted() { |
| 808 | return ErrKeySortOrder |
| 809 | } |
| 810 | |
| 811 | if len(ra.keys) != len(ra.containers) { |
| 812 | return ErrCardinalityConstraint |
| 813 | } |
| 814 | |
| 815 | if len(ra.keys) != len(ra.needCopyOnWrite) { |
| 816 | return ErrCardinalityConstraint |
| 817 | } |
| 818 | |
| 819 | for _, container := range ra.containers { |
| 820 | err := container.validate() |
| 821 | if err != nil { |
| 822 | return err |
| 823 | } |
| 824 | } |
| 825 | |
| 826 | return nil |
| 827 | } |
nothing calls this directly
no test coverage detected