Refactors:
Add test 40 refactor how we get data type from type Call contains type now to handle certain record cases
This commit is contained in:
16
examples/acceptance_tests/040/lib/tests.ak
Normal file
16
examples/acceptance_tests/040/lib/tests.ak
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
|
||||
|
||||
pub type Car{
|
||||
Honda { remote_connect: ByteArray, owner: ByteArray, wheels: Int}
|
||||
Ford { remote_connect: ByteArray, owner: ByteArray, wheels: Int, truck_bed_limit: Int }
|
||||
}
|
||||
|
||||
|
||||
|
||||
test update_owner1(){
|
||||
let initial_car: Data = Ford{remote_connect: #[], owner: #[], wheels: 4, truck_bed_limit: 10000}
|
||||
assert Ford{ owner, ..} = initial_car
|
||||
owner == #[]
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user