Skip to content

Commit fd99b5d

Browse files
Jayant Krishnamurthyguibescos
authored andcommitted
actually fix tests
1 parent 16aa808 commit fd99b5d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

program/rust/src/tests/test_upd_price.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ fn test_upd_price() {
249249
}
250250

251251
// Crank one more time and aggregate should be unknown
252-
populate_instruction(&mut instruction_data, 50, 6, 6);
252+
populate_instruction(&mut instruction_data, 50, 20, 6);
253253
update_clock_slot(&mut clock_account, 7);
254254

255255
assert!(process_instruction(
@@ -266,7 +266,7 @@ fn test_upd_price() {
266266
{
267267
let price_data = load_checked::<PriceAccount>(&price_account, PC_VERSION).unwrap();
268268
assert_eq!(price_data.comp_[0].latest_.price_, 50);
269-
assert_eq!(price_data.comp_[0].latest_.conf_, 6);
269+
assert_eq!(price_data.comp_[0].latest_.conf_, 20);
270270
assert_eq!(price_data.comp_[0].latest_.pub_slot_, 6);
271271
assert_eq!(price_data.comp_[0].latest_.status_, PC_STATUS_UNKNOWN);
272272
assert_eq!(price_data.valid_slot_, 6);

program/rust/src/tests/test_upd_price_no_fail_on_error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ fn test_upd_price_no_fail_on_error_no_fail_on_error() {
158158
assert_eq!(price_data.comp_[0].latest_.price_, 42);
159159
assert_eq!(price_data.comp_[0].latest_.conf_, 9);
160160
assert_eq!(price_data.comp_[0].latest_.pub_slot_, 1);
161-
assert_eq!(price_data.comp_[0].latest_.status_, PC_STATUS_UNKNOWN);
161+
assert_eq!(price_data.comp_[0].latest_.status_, PC_STATUS_TRADING);
162162
assert_eq!(price_data.valid_slot_, 0);
163163
assert_eq!(price_data.agg_.pub_slot_, 1);
164164
assert_eq!(price_data.agg_.price_, 0);

program/rust/src/tests/test_upd_sma.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ fn test_upd_sma() {
328328
}
329329

330330
// Crank one more time and aggregate should be unknown
331-
populate_instruction(&mut instruction_data, 50, 6, 6);
331+
populate_instruction(&mut instruction_data, 50, 20, 6);
332332
update_clock_slot(&mut clock_account, 7);
333333

334334
assert!(process_instruction(
@@ -345,7 +345,7 @@ fn test_upd_sma() {
345345
{
346346
let price_data = load_checked::<PriceAccountWrapper>(&price_account, PC_VERSION).unwrap();
347347
assert_eq!(price_data.price_data.comp_[0].latest_.price_, 50);
348-
assert_eq!(price_data.price_data.comp_[0].latest_.conf_, 6);
348+
assert_eq!(price_data.price_data.comp_[0].latest_.conf_, 20);
349349
assert_eq!(price_data.price_data.comp_[0].latest_.pub_slot_, 6);
350350
assert_eq!(
351351
price_data.price_data.comp_[0].latest_.status_,

0 commit comments

Comments
 (0)