test_spec.use

来自「UML设计测试工具」· USE 代码 · 共 50 行

USE
50
字号
-- $ProjectHeader: use 2-3-0-release.1 Mon, 12 Sep 2005 20:18:33 +0200 green $model ABclass Aoperations  op()endclass Battributes  c : Integerendassociation R between  A[*]  B[1]endconstraintscontext A::op()  pre:  self.b.c = 1  post p1: self.b.c = 0  post p2: self.b@pre.c = 2  post p3: self.b@pre.c@pre = 1  post p4: self.b.c@pre = oclUndefined(Integer)/*-- create initial state:!create a : A!create b1 : B!set b1.c := 1!insert (a, b1) into R-- enter operation, check preconditions, save current state!openter a.op()-- effect of op()!set b1.c := 2!delete (a,b1) from R!create b2 : B!set b2.c := 0!insert (a, b2) into R-- exit operation, check postconditions with saved and current state!opexit*/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?