Assertions Prasun Dewan Comp 114 Assertions Declare some property of the program Potentially useful for specification testing formal correctness documentation Compile time vs. runtime properties Some assertions language supported Compile time String s = nextElement() Runtime ((String) nextElement()) Asserting type properties of object. Assertions describe runtime properties Application-independent vs. dependent Language can provide us with fixed number of application-independent assertions. Cannot handle First character of String is a letter. Letter concept not burnt into language. Class Cha
原创力文档

文档评论(0)