Skip to content

Commit 5287b24

Browse files
Ref bitshares#1604: Another test case
1 parent 993a1c3 commit 5287b24

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/tests/operation_tests.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ BOOST_AUTO_TEST_CASE(limit_order_update_test)
111111
GRAPHENE_REQUIRE_THROW(update_limit_order(order_id), fc::assert_exception);
112112
// Cannot update order to use inverted price assets
113113
GRAPHENE_REQUIRE_THROW(update_limit_order(order_id, price(bitusd.amount(2), asset(1))), fc::assert_exception);
114+
// Cannot update order to use negative price
115+
GRAPHENE_REQUIRE_THROW(update_limit_order(order_id, price(asset(-1), bitusd.amount(2))), fc::assert_exception);
116+
GRAPHENE_REQUIRE_THROW(update_limit_order(order_id, price(asset(1), bitusd.amount(-2))), fc::assert_exception);
114117
// Cannot update order to use different assets
115118
GRAPHENE_REQUIRE_THROW(update_limit_order(order_id, price(bitusd.amount(2), munee.amount(1))), fc::assert_exception);
116119
GRAPHENE_REQUIRE_THROW(update_limit_order(order_id, price(munee.amount(2), bitusd.amount(1))), fc::assert_exception);

0 commit comments

Comments
 (0)