def test_StripComments_small_program(): """Test Strip Comments on a small program.""" assert cxx.StripComments(""" /* comment header */ int main(int argc, char** argv) { // main function. return /* foo */ 0; } """) == """
def test_StripComments_only_comment(): """Test StripComments on an input containing only comments.""" assert cxx.StripComments("// Just a comment") == " " assert cxx.StripComments("/* Just a comment */") == " "
def test_StripComments_empty_input(): """Test StripComments on an empty input.""" assert cxx.StripComments("") == ""
def test_StripComments_only_comment(): """Test StripComments on an input containing only comments.""" assert cxx.StripComments('// Just a comment') == ' ' assert cxx.StripComments('/* Just a comment */') == ' '