Beispiel #1
0
def test_ClangFormat_long_line():
  """Test that extremely long lines are not wrapped."""
  assert java.ClangFormat("""
public class VeryVeryLongNameeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
extends VeryVeryLongNameeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeBase {
}
""") == """
Beispiel #2
0
def test_ClangFormat_hello_world():
  """Test formatting of a "hello world" Java program."""
  assert java.ClangFormat("""
public class HelloWorld {
    public static void main(String [] args) {
        System.out.println("Hello, World"    );
    } }
""") == """