~~ lineWidth: 40 ~~
== should print ==
while (true) {
    a;
    b;
}

[expect]
while (true) {
    a;
    b;
}

== should print multi-line ==
while (thisIsA && veryLongHeader && that) {
    a;
    b;
}

[expect]
while (
    thisIsA && veryLongHeader && that
) {
    a;
    b;
}

== should print multi-line when exceeding width twice ==
while (thisIsA && veryLongHeader && thatWillExceedTwice) {
    a;
    b;
}

[expect]
while (
    thisIsA && veryLongHeader
    && thatWillExceedTwice
) {
    a;
    b;
}

== should use multiple lines if open paren is on a different line than condition ==
while (
    true) {
    }

[expect]
while (
    true
) {
}

== should print empty while statement on same line when on same line ==
while (true) {}

[expect]
while (true) {}

== should print empty while statement on different line when close brace on different line ==
while (true) {
}

[expect]
while (true) {
}

== should print empty with inner comment on same line ==
while (true) { /* 1 */ }
while (true) {
/* test */}

[expect]
while (true) { /* 1 */ }
while (true) {
    /* test */
}

== should print when only has an empty statement ==
while (true);

[expect]
while (true);

== should print when only has an empty statement on next line ==
while (true)
    ;

[expect]
while (true);

== should support comments in header ==
while (
    // testing
    test
) {
    a;
}

[expect]
while (
    // testing
    test
) {
    a;
}

== should move trailing header comment to next line ==
while (// testing
    test
) {
    a;
}

[expect]
while (
    // testing
    test
) {
    a;
}
