~~ lineWidth: 20 ~~
== should print ==
1234+12345   * 5;

[expect]
1234 + 12345 * 5;

== should print hanging when exceeding line width ==
1234 + 12345 - 5 - 10;

[expect]
1234 + 12345 - 5
    - 10;

== should print hanging when exceeding line width multiple times ==
1234 + 12345 - 5 - 10 - 200 + 509;

[expect]
1234 + 12345 - 5
    - 10 - 200
    + 509;

== should maintain newlines ==
12347879 + 20
    + 567 + 214
    + 32;

[expect]
12347879 + 20
    + 567 + 214
    + 32;

== should group together multiplication when used with addition or subtraction ==
1234 + 12345 * 5 * 10 * 200 + 509;

[expect]
1234
    + 12345 * 5 * 10
        * 200
    + 509;

== should maintain parentheses ==
(1 + 43) + 5 + (20 + 23);

[expect]
(1 + 43) + 5
    + (20 + 23);

== should handle comments on a different line in-between ==
asdfasdfasdf
    // some comment
    + container;

[expect]
asdfasdfasdf
    // some comment
    + container;

== should handle comments on a different line in-between when the operator is on the preceding line ==
asdfasdfasdf +
    // some comment
    container;

[expect]
asdfasdfasdf
    // some comment
    + container;

== should decide based on the left side's open paren token if it should be on a newline ==
(1 + 2) + (
    5 + 7
);

(1 + 2) +
(
    5 + 7
);

[expect]
(1 + 2) + (
    5 + 7
);

(1 + 2)
    + (
        5 + 7
    );

== should not cut off an inner expression midway ==
testing + this.testt;
otherTest + other.test + 34 + 2;

[expect]
testing
    + this.testt;
otherTest
    + other.test
    + 34 + 2;

== should not put triple equals on new line ==
testing && t === uvv;

[expect]
testing
    && t === uvv;

== should indent when a non-breaking expression happens to be on a new line ==
4545454444545 & 53453443;

[expect]
4545454444545
    & 53453443;

== should not place triple equals at same indentation as OR ===
testing(testing)
    || testing
    === test;

[expect]
testing(testing)
    || testing
        === test;

== should indent following lines when in call expr argument ==
call(
    testing && testing && test,
    asdf,
);

[expect]
call(
    testing
        && testing
        && test,
    asdf,
);

== should indent following lines when in new expr argument ==
new Test(
    testing && testing && test,
    asdf,
);

[expect]
new Test(
    testing
        && testing
        && test,
    asdf,
);

== should support multi-line ==
a && b && {
    test: 5
};

[expect]
a && b && {
    test: 5,
};

== should format bitwise operators with proper presedence ==
testst & test | test & other | test ^ asdf | test;

[expect]
testst & test
    | test & other
    | test ^ asdf
    | test;

== should format bitwise inline ==
if (
    tttttttttttt ^ ttttttttttt
) {
}
if (
    tttttttttttt & ttttttttttt
) {
}
if (
    tttttttttttt | ttttttttttt
) {
}

[expect]
if (
    tttttttttttt
    ^ ttttttttttt
) {
}
if (
    tttttttttttt
    & ttttttttttt
) {
}
if (
    tttttttttttt
    | ttttttttttt
) {
}

== swc issue where it didn't tokenize << correctly here ==
const test = a << 1;

[expect]
const test = a << 1;

== should format bitshift inline ==
if (
    tttttttttttt >> ttttttttttt
) {
}
if (
    tttttttttttt >>> ttttttttttt
) {
}
if (
    tttttttttttt << ttttttttttt
) {
}

[expect]
if (
    tttttttttttt
    >> ttttttttttt
) {
}
if (
    tttttttttttt
    >>> ttttttttttt
) {
}
if (
    tttttttttttt
    << ttttttttttt
) {
}

== should format mod inline ==
if (
    tttttttttttt % ttttttttttt
) {
}

[expect]
if (
    tttttttttttt
    % ttttttttttt
) {
}

== should use a newline group for equality checks and not break them up so easily ==
let a = test == test;
let b = test === test;
let c = test !== test;
let d = test != test;
let e = test < testt;
let f = test > testt;
let g = test >= test;
let h = test <= test;

[expect]
let a =
    test == test;
let b =
    test === test;
let c =
    test !== test;
let d =
    test != test;
let e =
    test < testt;
let f =
    test > testt;
let g =
    test >= test;
let h =
    test <= test;

== should format with comment before ==
const test =
    // testing
    a   + b + c;

[expect]
const test =
    // testing
    a + b + c;
