@@ -18,23 +18,27 @@ Method OnBeforeAllTests() As %Status
1818 // Build wrapped implementation
1919 set newImp = ##class (%Stream.TmpCharacter ).%New ()
2020
21- do newImp .WriteLine (
21+ set sc = newImp .WriteLine (
2222 " set ^CacheTemp.BuildDependencyGraph($job)=$increment(^CacheTemp.BuildDependencyGraph($job))"
2323 )
24+ do $$$AssertStatusOK(sc , " Wrote new line into BuildDependencyGraph() successfully." )
2425
2526 // Rewind original and copy it
2627 do methodDef .Implementation .Rewind ()
2728 while 'methodDef .Implementation .AtEnd {
28- do newImp .WriteLine (methodDef .Implementation .ReadLine ())
29+ set sc = newImp .WriteLine (methodDef .Implementation .ReadLine ())
30+ do $$$AssertStatusOK(sc , " Copied original line into new definition of BuildDependencyGraph() successfully." )
2931 }
3032
3133 // Replace implementation
3234 set methodDef .Implementation = newImp
33- do methodDef .%Save ()
35+ set sc = methodDef .%Save ()
36+ do $$$AssertStatusOK(sc , " Saved new method definition for BuildDependencyGraph() successfully." )
3437
3538 // Recompile the class
36- do $system .OBJ .Compile (" %IPM.Storage.Module" , " cuk" )
37- return $$$OK
39+ set sc = $system .OBJ .Compile (" %IPM.Storage.Module" , " cuk" )
40+ do $$$AssertStatusOK(sc , " Compiled test definition of %IPM.Storage.Module successfully." )
41+ return sc
3842}
3943
4044/// Counts the number of times that BuildDependencyGraph() gets invoked on test modules' installation to catch regressions
@@ -57,17 +61,20 @@ Method OnAfterAllTests() As %Status
5761
5862 if $data (^CacheTemp .BuildDependencyGraph (" orig" , $job )) {
5963 set imp = ##class (%Stream.TmpCharacter ).%New ()
60- do imp .Write (^CacheTemp .BuildDependencyGraph (" orig" , $job ))
64+ set sc = imp .Write (^CacheTemp .BuildDependencyGraph (" orig" , $job ))
65+ do $$$AssertStatusOK(sc , " Wrote back original method definition of BuildDependencyGraph() successfully." )
6166 set methodDef .Implementation = imp
62- do methodDef .%Save ()
63- do $system .OBJ .Compile (" %IPM.Storage.Module" , " cuk" )
67+ set sc = methodDef .%Save ()
68+ do $$$AssertStatusOK(sc , " Saved original method definition of BuildDependencyGraph() successfully." )
69+ set sc = $system .OBJ .Compile (" %IPM.Storage.Module" , " cuk" )
70+ do $$$AssertStatusOK(sc , " Compiled original definition of %IPM.Storage.Module successfully." )
6471 }
6572
6673 kill ^CacheTemp .BuildDependencyGraph ($job )
6774
6875 set sc = ##class (%IPM.Main ).Shell (" repo -delete -name build-dependency-graph" )
6976 do $$$AssertStatusOK(sc , " Deleted build-dependency-graph repo successfully." )
70- return $$$OK
77+ return sc
7178}
7279
7380}
0 commit comments