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

Fix quantity overflow #146

Merged

Conversation

justacasul
Copy link

fixed quantity overflow

@justacasul justacasul self-assigned this Nov 2, 2020
@justacasul justacasul linked an issue Nov 2, 2020 that may be closed by this pull request
@codecov-io
Copy link

codecov-io commented Nov 2, 2020

Codecov Report

Merging #146 into master will decrease coverage by 0.05%.
The diff coverage is 42.85%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #146      +/-   ##
============================================
- Coverage     75.09%   75.03%   -0.06%     
  Complexity      864      864              
============================================
  Files           125      125              
  Lines          2554     2556       +2     
  Branches        288      289       +1     
============================================
  Hits           1918     1918              
- Misses          534      535       +1     
- Partials        102      103       +1     
Impacted Files Coverage Δ Complexity Δ
...dress/logic/commands/AddQuantityToItemCommand.java 84.78% <20.00%> (-3.86%) 13.00 <0.00> (ø)
...ava/seedu/address/logic/parser/ItemParserUtil.java 84.84% <100.00%> (ø) 12.00 <0.00> (ø)
...c/main/java/seedu/address/model/item/Quantity.java 85.71% <100.00%> (ø) 10.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0620257...7191b63. Read the comment docs.

Copy link

@Rahul0506 Rahul0506 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@blackonyyx blackonyyx left a comment

Choose a reason for hiding this comment

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

LGTM after unittest added

@@ -35,15 +35,15 @@
public static final String MESSAGE_ITEM_NOT_PROVIDED = "Item name must be provided.";
public static final String MESSAGE_QUANTITY_NOT_PROVIDED = "Quantity must be provided.";
public static final String MESSAGE_NEGATIVE_QUANTITY = "Quantity will become negative.";

private static final String MESSAGE_OVERFLOW_QUANTITY = "Quantity will overflow.";

Choose a reason for hiding this comment

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

Needs a test case for this

Copy link
Author

@justacasul justacasul Nov 2, 2020

Choose a reason for hiding this comment

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

yee
image

@justacasul justacasul merged commit 01f4abd into AY2021S1-CS2103T-F13-1:master Nov 2, 2020
@justacasul justacasul added this to the v1.4 milestone Nov 2, 2020
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.

quantity overflow
4 participants