astyle fix

This commit is contained in:
Reijo Tomperi 2009-09-19 14:21:50 +03:00
parent 7f2ca357b0
commit 661e4504cb
2 changed files with 33 additions and 33 deletions

View File

@ -563,8 +563,8 @@ private:
"}\n"; "}\n";
ASSERT_EQUALS( ASSERT_EQUALS(
"void f ( ) { int a ; a = 10 ; if ( 10 ) ; }", "void f ( ) { int a ; a = 10 ; if ( 10 ) ; }",
simplifyKnownVariables(code)); simplifyKnownVariables(code));
} }
{ {
@ -575,8 +575,8 @@ private:
"}\n"; "}\n";
ASSERT_EQUALS( ASSERT_EQUALS(
"void f ( ) { int a ; a = 10 ; if ( ! 10 ) ; }", "void f ( ) { int a ; a = 10 ; if ( ! 10 ) ; }",
simplifyKnownVariables(code)); simplifyKnownVariables(code));
} }
} }
@ -590,8 +590,8 @@ private:
"}\n"; "}\n";
ASSERT_EQUALS( ASSERT_EQUALS(
"void f ( ) { int a ; a = 10 ; a = g ( ) ; if ( a ) ; }", "void f ( ) { int a ; a = 10 ; a = g ( ) ; if ( a ) ; }",
simplifyKnownVariables(code)); simplifyKnownVariables(code));
} }
void simplifyKnownVariables3() void simplifyKnownVariables3()
@ -607,8 +607,8 @@ private:
"}\n"; "}\n";
ASSERT_EQUALS( ASSERT_EQUALS(
"void f ( ) { int a ; a = 4 ; while ( true ) { break ; a = 10 ; } if ( a ) ; }", "void f ( ) { int a ; a = 4 ; while ( true ) { break ; a = 10 ; } if ( a ) ; }",
simplifyKnownVariables(code)); simplifyKnownVariables(code));
} }
void simplifyKnownVariables4() void simplifyKnownVariables4()
@ -620,8 +620,8 @@ private:
"}\n"; "}\n";
ASSERT_EQUALS( ASSERT_EQUALS(
"void f ( ) { int a ; a = 4 ; if ( g ( 4 ) ) ; }", "void f ( ) { int a ; a = 4 ; if ( g ( 4 ) ) ; }",
simplifyKnownVariables(code)); simplifyKnownVariables(code));
} }
void simplifyKnownVariables5() void simplifyKnownVariables5()
@ -633,8 +633,8 @@ private:
"}\n"; "}\n";
ASSERT_EQUALS( ASSERT_EQUALS(
"void f ( ) { int a ; a = 4 ; if ( a = 5 ) ; }", "void f ( ) { int a ; a = 4 ; if ( a = 5 ) ; }",
simplifyKnownVariables(code)); simplifyKnownVariables(code));
} }
void simplifyKnownVariables6() void simplifyKnownVariables6()
@ -647,8 +647,8 @@ private:
"}\n"; "}\n";
ASSERT_EQUALS( ASSERT_EQUALS(
"void f ( ) { char str [ 2 ] ; int a ; a = 4 ; str [ 4 ] = 0 ; }", "void f ( ) { char str [ 2 ] ; int a ; a = 4 ; str [ 4 ] = 0 ; }",
simplifyKnownVariables(code)); simplifyKnownVariables(code));
} }
void simplifyKnownVariables7() void simplifyKnownVariables7()
@ -661,8 +661,8 @@ private:
"}\n"; "}\n";
ASSERT_EQUALS( ASSERT_EQUALS(
"void foo ( ) { int i ; i = 24 ; abc [ 22 ] = 1 ; abc [ 24 ] = 2 ; }", "void foo ( ) { int i ; i = 24 ; abc [ 22 ] = 1 ; abc [ 24 ] = 2 ; }",
simplifyKnownVariables(code)); simplifyKnownVariables(code));
} }
void simplifyKnownVariables8() void simplifyKnownVariables8()
@ -675,8 +675,8 @@ private:
"}\n"; "}\n";
ASSERT_EQUALS( ASSERT_EQUALS(
"void foo ( ) { int i ; i = 23 ; ; abc [ 23 ] = 0 ; }", "void foo ( ) { int i ; i = 23 ; ; abc [ 23 ] = 0 ; }",
simplifyKnownVariables(code)); simplifyKnownVariables(code));
} }
void simplifyKnownVariables9() void simplifyKnownVariables9()
@ -689,8 +689,8 @@ private:
"}\n"; "}\n";
ASSERT_EQUALS( ASSERT_EQUALS(
"void foo ( ) { int a ; a = 1 ; int b ; b = 2 ; if ( 1 < 2 ) ; }", "void foo ( ) { int a ; a = 1 ; int b ; b = 2 ; if ( 1 < 2 ) ; }",
simplifyKnownVariables(code)); simplifyKnownVariables(code));
} }
void simplifyKnownVariables10() void simplifyKnownVariables10()
@ -711,8 +711,8 @@ private:
"}\n"; "}\n";
TODO_ASSERT_EQUALS( TODO_ASSERT_EQUALS(
"void f ( ) { bool b ; b = false ; { b = true ; } if ( true ) { a ( ) ; } }", "void f ( ) { bool b ; b = false ; { b = true ; } if ( true ) { a ( ) ; } }",
simplifyKnownVariables(code)); simplifyKnownVariables(code));
} }
{ {
@ -731,8 +731,8 @@ private:
"}\n"; "}\n";
TODO_ASSERT_EQUALS( TODO_ASSERT_EQUALS(
"void f ( ) { bool b ; b = false ; { b = false ; } { b = true ; } if ( true ) { a ( ) ; } }", "void f ( ) { bool b ; b = false ; { b = false ; } { b = true ; } if ( true ) { a ( ) ; } }",
simplifyKnownVariables(code)); simplifyKnownVariables(code));
} }
{ {
@ -748,8 +748,8 @@ private:
"}\n"; "}\n";
ASSERT_EQUALS( ASSERT_EQUALS(
"void f ( ) { int b ; b = 0 ; b = 1 ; for ( int i = 0 ; i < 10 ; i ++ ) { } a ( 1 ) ; }", "void f ( ) { int b ; b = 0 ; b = 1 ; for ( int i = 0 ; i < 10 ; i ++ ) { } a ( 1 ) ; }",
simplifyKnownVariables(code)); simplifyKnownVariables(code));
} }
} }
@ -762,8 +762,8 @@ private:
"}\n"; "}\n";
ASSERT_EQUALS( ASSERT_EQUALS(
"const int foo = 0 ; int main ( ) { int foo ; foo = 0 ; }", "const int foo = 0 ; int main ( ) { int foo ; foo = 0 ; }",
simplifyKnownVariables(code)); simplifyKnownVariables(code));
} }
void simplifyKnownVariables12() void simplifyKnownVariables12()
@ -772,8 +772,8 @@ private:
"const double pi = 3.14;\n" "const double pi = 3.14;\n"
"int main(){}\n"; "int main(){}\n";
ASSERT_EQUALS( ASSERT_EQUALS(
"ENTER_NAMESPACE ( project_namespace ) const double pi = 3.14 ; int main ( ) { }", "ENTER_NAMESPACE ( project_namespace ) const double pi = 3.14 ; int main ( ) { }",
simplifyKnownVariables(code)); simplifyKnownVariables(code));
} }
void simplifyKnownVariables13() void simplifyKnownVariables13()
@ -785,8 +785,8 @@ private:
"}\n"; "}\n";
ASSERT_EQUALS( ASSERT_EQUALS(
"void f ( ) { int i ; i = 10 ; while ( -- i ) { } }", "void f ( ) { int i ; i = 10 ; while ( -- i ) { } }",
simplifyKnownVariables(code)); simplifyKnownVariables(code));
} }