Add new acceptance test scenario: 052
Pattern-match on unary constructors.
This commit is contained in:
parent
c50bf94020
commit
cf7a20b986
|
@ -0,0 +1,5 @@
|
|||
# This file was generated by Aiken
|
||||
# You typically do not need to edit this file
|
||||
|
||||
requirements = []
|
||||
packages = []
|
|
@ -0,0 +1,3 @@
|
|||
name = 'aiken-lang/acceptance_test_052'
|
||||
version = '0.0.0'
|
||||
description = ''
|
|
@ -0,0 +1,17 @@
|
|||
type TransactionId {
|
||||
inner: ByteArray,
|
||||
}
|
||||
|
||||
test pattern_match_let() {
|
||||
let x = TransactionId { inner: #"0000" }
|
||||
let TransactionId(y) = x
|
||||
y == #"0000"
|
||||
}
|
||||
|
||||
test pattern_match_when() {
|
||||
let x = TransactionId { inner: #"0000" }
|
||||
let y = when x is {
|
||||
TransactionId(y) -> y
|
||||
}
|
||||
y == #"0000"
|
||||
}
|
Loading…
Reference in New Issue