• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 466
  • Last Modified:

assert.replacenullchars

What is the proper time to use this assertion in a test?

I'm looking for a practical example.

Thanks,

G
0
gswitz
Asked:
gswitz
1 Solution
 
Alan WarrenApplications DeveloperCommented:
Nulls propagate, so if you return them as part of a string, the entire string will return null.

So you would use it when you want to return a string (maybe to be used as a log entry), as a string that contains nulls, but not have the entire string return null.

You may want to consider Assert.EscapeNonprintableChars, which replaces not only \0 (null) character but all non-printable characters too.

Alan
0
 
gswitzAuthor Commented:
Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now