Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#395 closed defect (fixed)

Requirements can incorrectly allow based on common divisor

Reported by: ibboard Owned by: ibboard
Priority: blocker Milestone: WarFoundry API 0.2
Component: WarFoundry-API Version: Trunk
Keywords: requirement army validation Cc:
Blocked By: Blocking:

Description

Snowblizz has found that [464/IBBoard.WarFoundry.API] has broken requirements that can be represented as a fraction using smaller number (e.g. "2 allowed for every 4" should not allow any with 3, but is now allowing 1 for every 2 because 2 and 4 are divisible by 2).

Change History (7)

comment:1 Changed 8 years ago by ibboard

Owner: set to ibboard
Status: newaccepted

comment:2 Changed 8 years ago by IBBoard <dev@…>

In 12ac487af0baeb8944681f82afc8a328523fd902/IBBoard.WarFoundry.API.Tests:

Re #395: Requirements can incorrectly allow based on common divisor

  • Add tests to check for using common divisor (e.g. allowing 1 per 2 when we said allow 2 per 4)

comment:3 Changed 8 years ago by IBBoard <dev@…>

In bdfa314789ccad9f6a025e8ac955de189800d7fc/IBBoard.WarFoundry.API:

Re #395: Requirements can incorrectly allow based on common divisor

  • Rebuild validation check to use normalised values

comment:4 Changed 8 years ago by ibboard

Resolution: fixed
Status: acceptedclosed

comment:5 Changed 8 years ago by ibboard

Resolution: fixed
Status: closedreopened

Thought of another value that needed testing.

comment:6 Changed 8 years ago by IBBoard <dev@…>

Resolution: fixed
Status: reopenedclosed

In 750eed630c41a7ec26a43c4195b8c1179bbab437/IBBoard.WarFoundry.API:

Fixes #395: Requirements can incorrectly allow based on common divisor

  • Round the "limited/required" normalised count down to get correct values

comment:7 Changed 8 years ago by IBBoard <dev@…>

In fd51527f6d64190112f55f6e6e60ae790a24cd42/IBBoard.WarFoundry.API.Tests:

Re #395: Requirements can incorrectly allow based on common divisor

  • Test for 3 given 6 (which would give the 1:2 ratio but not the 2:4 ratio)
Note: See TracTickets for help on using tickets.