Private Sub TranslateStringUsingCharacterPairsVerify() 'Test the TranslateStringUsingCharacterPairs function. Debug.Assert IsNull(TranslateStringUsingCharacterPairs(Null, "aAbBcC")) ' Behavior #1 Debug.Assert IsNull(TranslateStringUsingCharacterPairs("Abraham", Null)) ' Behavior #2 Debug.Assert TranslateStringUsingCharacterPairs("Cba", "aDbEcF", vbBinaryCompare) = "CED" ' Behavior #3 Debug.Assert TranslateStringUsingCharacterPairs("Cba", "ADBECF", vbBinaryCompare) = "Fba" Debug.Assert TranslateStringUsingCharacterPairs("Cba", "aDbEcF", vbTextCompare) = "FED" Debug.Assert TranslateStringUsingCharacterPairs("Cba", "ADBECF", vbTextCompare) = "FED" Debug.Assert TranslateStringUsingCharacterPairs("Cba", "aDbEcF") = "CED" ' Behavior #4 Debug.Assert TranslateStringUsingCharacterPairs("Cba", "ADBECF") = "Fba" Debug.Assert TranslateStringUsingCharacterPairs("Cba", "ADBECF", Null) = "Fba" Debug.Assert TranslateStringUsingCharacterPairs("Cba", "ADBECF", "Joe") = "Fba" Debug.Assert TranslateStringUsingCharacterPairs("EDCBA", "AJBKC") = "EDCKJ" ' General Behavior Debug.Assert TranslateStringUsingCharacterPairs("Cab", "aAbBcC") = "CAB" End Sub
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.