forked from shramee/starklings-cairo1
-
Notifications
You must be signed in to change notification settings - Fork 1
/
arrays3.cairo
30 lines (23 loc) · 667 Bytes
/
arrays3.cairo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// arrays3.cairo
// Make me compile and pass the test!
// Execute `starklings hint arrays3` or use the `hint` watch subcommand for a hint.
// I AM NOT DONE
use array::ArrayTrait;
use option::OptionTrait;
fn create_array() -> Array::<felt> {
let mut a = ArrayTrait::new(); // something to change here...
a.append(0);
a.append(1);
a.append(2);
a.pop_front().unwrap();
a
}
#[test]
fn test_arrays3() {
let mut a = create_array();
//TODO modify the method called below to make the test pass.
// You should not change the index accessed.
a.at(2_usize);
}
// Don't mind this for now.
impl OptionDrop of Drop::<Option::<felt>>;