• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

CS2113-AY1819S2-T09-1 / main / 352 / 1
92%
master: 92%

Build:
DEFAULT BRANCH: master
Ran 18 Mar 2019 06:37AM UTC
Files 101
Run time 4s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

18 Mar 2019 06:33AM UTC coverage: 83.107% (+0.06%) from 83.043%
352.1

push

travis-ci

lycjackie
Model: update `Credits#VALIDATION_REGEX` (#83)

`Credits#VALIDATION_REGEX` accepts at least 3 digits. However, this
constraint is too strict, and in addition, also assumes that there are
at least 3 digits supplied.

Consider the following logically valid `Credits`:

    0 Credits - entered as 000 (00000....0 is accepted too)
    4 Credits - entered as 005 (00000....4 is accepted too)
   12 Credits - entered as 012 (00000...12 is accepted too)
  150 Credits - entered as 150 (00000..150 is accepted too)

This makes adding / editing `Credits` extremely unintuitive for users.
We should instead treat the following `Credits`:

    0 Credits - accepted when entered exactly as: 0
    4 Credits - accepted when entered exactly as: 4
   12 Credits - accepted when entered exactly as: 12
  150 Credits - accepted when entered exactly as: 150

In addition, because the current constraint is lax, users may enter
arbitrary and large vaues for Credits (e.g. 999999999). However, in
practice, such large values are never needed.

Let's modify and update the `Credits` restrictions by:
* accepting up to 3 numeric digits only
* rejecting values with multiple digits beginning with `0`
* update `Credits#MESSAGE_CONSTRAINTS` to reflect the new range of
  acceptable values (0 - 999)

In addition, let's also update all affected unit tests that violates the
new credits constraint.

1771 of 2131 relevant lines covered (83.11%)

0.83 hits per line

Source Files on job 352.1
  • Tree
  • List 0
  • Changed 4
  • Source Changed 4
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 258
  • Travis Job 352.1
  • b2f65de9 on github
  • Prev Job for on master (#341.1)
  • Next Job for on master (#358.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc