Initial Dever 0.0.1
This commit is contained in:
commit
81233d098c
1479 files changed
+163782
No files matched your search
@@ -0,0 +1,7 @@
|
||||
verify() (answer: Bool) {
|
||||
original = vault.make("旧键")
|
||||
alias = original
|
||||
changed = vault.change(original, "新键")
|
||||
alias.label = "别名"
|
||||
answer = vault.read(original) == "旧键" and vault.read(alias) == "旧键" and vault.read(changed) == "新键" and original.label == "原名" and alias.label == "别名" and changed.label == "原名"
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
public type Session {
|
||||
private key: Text
|
||||
label: Text
|
||||
}
|
||||
|
||||
public make(key: Text) (answer: Session) {
|
||||
answer = Session { key = key, label = "原名" }
|
||||
}
|
||||
|
||||
public read(value: Session) (answer: Text) {
|
||||
answer = value.key
|
||||
}
|
||||
|
||||
public change(value: Session, key: Text) (answer: Session) {
|
||||
value.key = key
|
||||
answer = value
|
||||
}
|
||||
Reference in new issue
Block a user