Skip to content

Commit c1e5034

Browse files
author
Jayant Krishnamurthy
committed
actually fix tests
1 parent b34b46f commit c1e5034

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
@@ -244,7 +244,7 @@ fn test_upd_price() {
244244
}
245245

246246
// Crank one more time and aggregate should be unknown
247-
populate_instruction(&mut instruction_data, 50, 6, 6);
247+
populate_instruction(&mut instruction_data, 50, 20, 6);
248248
update_clock_slot(&mut clock_account, 7);
249249

250250
assert!(process_instruction(
@@ -261,7 +261,7 @@ fn test_upd_price() {
261261
{
262262
let price_data = load_checked::<PriceAccount>(&price_account, PC_VERSION).unwrap();
263263
assert_eq!(price_data.comp_[0].latest_.price_, 50);
264-
assert_eq!(price_data.comp_[0].latest_.conf_, 6);
264+
assert_eq!(price_data.comp_[0].latest_.conf_, 20);
265265
assert_eq!(price_data.comp_[0].latest_.pub_slot_, 6);
266266
assert_eq!(price_data.comp_[0].latest_.status_, PC_STATUS_UNKNOWN);
267267
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
@@ -153,7 +153,7 @@ fn test_upd_price_no_fail_on_error_no_fail_on_error() {
153153
assert_eq!(price_data.comp_[0].latest_.price_, 42);
154154
assert_eq!(price_data.comp_[0].latest_.conf_, 9);
155155
assert_eq!(price_data.comp_[0].latest_.pub_slot_, 1);
156-
assert_eq!(price_data.comp_[0].latest_.status_, PC_STATUS_UNKNOWN);
156+
assert_eq!(price_data.comp_[0].latest_.status_, PC_STATUS_TRADING);
157157
assert_eq!(price_data.valid_slot_, 0);
158158
assert_eq!(price_data.agg_.pub_slot_, 1);
159159
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
@@ -324,7 +324,7 @@ fn test_upd_sma() {
324324
}
325325

326326
// Crank one more time and aggregate should be unknown
327-
populate_instruction(&mut instruction_data, 50, 6, 6);
327+
populate_instruction(&mut instruction_data, 50, 20, 6);
328328
update_clock_slot(&mut clock_account, 7);
329329

330330
assert!(process_instruction(
@@ -341,7 +341,7 @@ fn test_upd_sma() {
341341
{
342342
let price_data = load_checked::<PriceAccountWrapper>(&price_account, PC_VERSION).unwrap();
343343
assert_eq!(price_data.price_data.comp_[0].latest_.price_, 50);
344-
assert_eq!(price_data.price_data.comp_[0].latest_.conf_, 6);
344+
assert_eq!(price_data.price_data.comp_[0].latest_.conf_, 20);
345345
assert_eq!(price_data.price_data.comp_[0].latest_.pub_slot_, 6);
346346
assert_eq!(
347347
price_data.price_data.comp_[0].latest_.status_,

0 commit comments

Comments
 (0)