git-svn-id: https://projects.brucker.ch/su4sml/svn/su4sml/trunk@7936 3260e6d1-4efc-4170-b0a7-36055960796d

This commit is contained in:
Manuel Krucker 2008-05-09 15:21:34 +00:00
parent efbad20313
commit c0d4d6f621
3 changed files with 25 additions and 8 deletions

View File

@ -319,6 +319,7 @@ fun check_syntax wfpo (model:Rep.Model as (clist,alist)) =
let let
val _ = trace function_calls ("WFCPOG_Refine_Constraint.check_syntax\n") val _ = trace function_calls ("WFCPOG_Refine_Constraint.check_syntax\n")
val data = WFCPOG_RFM_Data.get wfpo val data = WFCPOG_RFM_Data.get wfpo
val _ = trace wgen (print_refine_args data)
val packages = (#rfm_tuple data) val packages = (#rfm_tuple data)
val from = (#1 packages) val from = (#1 packages)
val to = (#2 packages) val to = (#2 packages)

View File

@ -122,11 +122,13 @@ val pos = [po_cstr]
val wfs = [wfc_vis] val wfs = [wfc_vis]
val pos = [] val pos = []
*) *)
(*
val wfs = [] val wfs = []
val pos = [po_rfm_SR] val pos = [po_rfm_SC]
*)
(*
val wfc = val wfc =
[wfc_inf_nameclashes,wfc_inf_stereotypes,wfc_inf_all,wfc_vis_class,wfc_vis_inheritance,wfc_vis_runtime,wfc_vis_design_by_contract,wfc_vis,wfc_tax] [wfc_inf_nameclashes,wfc_inf_stereotypes,wfc_inf_all,wfc_vis_class,wfc_vis_inheritance,wfc_vis_runtime,wfc_vis_design_by_contract,wfc_vis,wfc_tax]
val pos = val pos =
[po_lsk_pre,po_lsk_post,po_lsk_inv,po_cm,po_sm,po_om,po_cstr_post,po_cstr_attribute,po_cstr] [po_lsk_pre,po_lsk_post,po_lsk_inv,po_cm,po_sm,po_om,po_cstr_post,po_cstr_attribute,po_cstr]
*)

View File

@ -161,7 +161,7 @@ fun start_tests model [] = []
val _ = trace wgen ("WFC_Failed_Exception handler ...\n") val _ = trace wgen ("WFC_Failed_Exception handler ...\n")
val _ = buffer:=((!buffer)^s) val _ = buffer:=((!buffer)^s)
in in
[(h,false)] raise WFCPOG.WFC_FailedException(h,s)
end end
val check = List.all (fn (a,b) => b = true) res_wfcs val check = List.all (fn (a,b) => b = true) res_wfcs
in in
@ -196,7 +196,7 @@ fun start_tests model [] = []
let let
val _ = buffer:=((!buffer)^s) val _ = buffer:=((!buffer)^s)
in in
[(h,[(["Exception"],(Variable("x",OclVoid)))])] raise WFCPOG.WFC_FailedException (h,s)
end end
in in
case pos of case pos of
@ -252,11 +252,18 @@ fun runTest name wfs pos =
val _ = trace wgen ("Accessing model ...\n") val _ = trace wgen ("Accessing model ...\n")
val s1 = (print_tc tc) val s1 = (print_tc tc)
val _ = (test tc wfs pos) val _ = (test tc wfs pos)
handle WFCPOG.WFC_FailedException (wfpo,s) =>
let
val _ = buffer:=((!buffer)^s)
in
[]
end
val _ = buffer:=s1^(!buffer) val _ = buffer:=s1^(!buffer)
in in
if (String.isSubstring "[Error]" (!buffer)) (if (String.isSubstring "[Error]" (!buffer))
then print ((!buffer)^"\n\n !!!!!!!!!! WFCPOG still contains bugs !!!!!!!!!!!!!\n\n\n") then print ((!buffer)^"\n\n !!!!!!!!!! WFCPOG still contains bugs !!!!!!!!!!!!!\n\n\n")
else print ((!buffer)^"\n\n !!!!!!!!!! Congratulations, no bugs !!!!!!!!!!!!!!\n\n\n") else print ((!buffer)^"\n\n !!!!!!!!!! Congratulations, no bugs !!!!!!!!!!!!!!\n\n\n")
)
end end
@ -268,9 +275,16 @@ fun runTests wfs pos =
let let
val s1 = (print_tc a) val s1 = (print_tc a)
val _ = buffer:=(!buffer)^s1 val _ = buffer:=(!buffer)^s1
val _ = (test a wfs pos) val data = (test a wfs pos)
handle WFCPOG.WFC_FailedException (wfpo,s) =>
let
val _ = buffer:=((!buffer)^s)
val _ = trace wgen (!buffer)
in
raise WFCPOG_TestSuiteError ("one wfc failed\n")
end
in in
() data
end) testcases end) testcases
in in
if (String.isSubstring "[ERROR]" (!buffer)) if (String.isSubstring "[ERROR]" (!buffer))