Private Sub TranslateStringVerify() 'Test the TranslateString function. Debug.Assert IsNull(TranslateString(Null, "abc", "ABC")) ' Behavior #1 Debug.Assert IsNull(TranslateString("Abraham", Null, "ABC")) ' Behavior #2 Debug.Assert IsNull(TranslateString("Abraham", "abc", Null)) ' Behavior #3 Debug.Assert TranslateString("Cba", "abc", "DEF", vbBinaryCompare) = "CED" ' Behavior #4 Debug.Assert TranslateString("Cba", "ABC", "DEF", vbBinaryCompare) = "Fba" Debug.Assert TranslateString("Cba", "abc", "DEF", vbTextCompare) = "FED" Debug.Assert TranslateString("Cba", "ABC", "DEF", vbTextCompare) = "FED" Debug.Assert TranslateString("Cba", "abc", "DEF") = "CED" ' Behavior #5 Debug.Assert TranslateString("Cba", "ABC", "DEF") = "Fba" Debug.Assert TranslateString("Cba", "ABC", "DEF", Null) = "Fba" Debug.Assert TranslateString("Cba", "ABC", "DEF", "Joe") = "Fba" Debug.Assert TranslateString("EDCBA", "AB", "JKL") = "EDCKJ" ' Behavior #6 Debug.Assert TranslateString("EDCBA", "ABC", "JK") = "EDCKJ" End Sub
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.