Skip to content

Fix range equality issues with infinite bounds. - #1493

Merged
roji merged 1 commit into
npgsql:devfrom
kurtschelfthout:dev
Mar 19, 2017
Merged

roji merged 1 commit into
npgsql:devfrom
kurtschelfthout:dev

Conversation

@kurtschelfthout

Copy link
Copy Markdown
Contributor

Fixes #1418.

@kurtschelfthout

Copy link
Copy Markdown
Contributor Author

Ok, third time's a charm. Sorry for all the shenanigans, this one should be ok.

@ross-bradbury

Copy link
Copy Markdown
Contributor

I suggest adding tests of two ranges that only differ in one end being finite vs infinite (though the code should pass that test already).

// Two ranges that only differ in lower infinite are not equal
var infinteLower = new NpgsqlRange<int>(0, false, true,  1, false, false);
var finiteLower  = new NpgsqlRange<int>(0, false, false, 1, false, false);
Assert.IsFalse(infiniteLower == finiteLower);

// Two ranges that only differ in upper infinite are not equal
var infinteUpper = new NpgsqlRange<int>(0, false, false, 1, false, true);
var finiteUpper  = new NpgsqlRange<int>(0, false, false, 1, false, false);
Assert.IsFalse(infiniteUpper == finiteUpper);

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.

3 participants