Added tests for c++ tools.
This commit is contained in:
parent
60a99ee705
commit
db660521fa
4 changed files with 32 additions and 1 deletions
8
golden-files/input/hello.cpp
Normal file
8
golden-files/input/hello.cpp
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
cout << "Hello World" << endl;
|
||||
}
|
||||
9
golden-files/results/bcpp-hello_cpp
Normal file
9
golden-files/results/bcpp-hello_cpp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[0m[38;2;205;40;40m[48;2;0;0;0m[1m#include <iostream>[0m[38;2;255;255;255m[48;2;0;0;0m
|
||||
|
||||
[0m[38;2;106;184;37m[48;2;0;0;0m[1musing[0m[38;2;208;208;208m[48;2;0;0;0m [0m[38;2;106;184;37m[48;2;0;0;0m[1mnamespace[0m[38;2;208;208;208m[48;2;0;0;0m std;[0m[38;2;255;255;255m[48;2;0;0;0m
|
||||
|
||||
[0m[38;2;106;184;37m[48;2;0;0;0m[1mint[0m[38;2;208;208;208m[48;2;0;0;0m [0m[38;2;68;127;207m[48;2;0;0;0mmain[0m[38;2;208;208;208m[48;2;0;0;0m()[0m[38;2;255;255;255m[48;2;0;0;0m
|
||||
[0m[38;2;208;208;208m[48;2;0;0;0m{[0m[38;2;255;255;255m[48;2;0;0;0m
|
||||
[0m[38;2;208;208;208m[48;2;0;0;0m cout << [0m[38;2;237;157;19m[48;2;0;0;0m"Hello World"[0m[38;2;208;208;208m[48;2;0;0;0m << endl;[0m[38;2;255;255;255m[48;2;0;0;0m
|
||||
[0m[38;2;208;208;208m[48;2;0;0;0m}[0m[38;2;255;255;255m[48;2;0;0;0m
|
||||
[0m
|
||||
9
golden-files/results/uncrustify-hello_cpp
Normal file
9
golden-files/results/uncrustify-hello_cpp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[0m[38;2;205;40;40m[48;2;0;0;0m[1m#include <iostream>[0m[38;2;255;255;255m[48;2;0;0;0m
|
||||
|
||||
[0m[38;2;106;184;37m[48;2;0;0;0m[1musing[0m[38;2;208;208;208m[48;2;0;0;0m [0m[38;2;106;184;37m[48;2;0;0;0m[1mnamespace[0m[38;2;208;208;208m[48;2;0;0;0m std;[0m[38;2;255;255;255m[48;2;0;0;0m
|
||||
|
||||
[0m[38;2;106;184;37m[48;2;0;0;0m[1mint[0m[38;2;208;208;208m[48;2;0;0;0m [0m[38;2;68;127;207m[48;2;0;0;0mmain[0m[38;2;208;208;208m[48;2;0;0;0m()[0m[38;2;255;255;255m[48;2;0;0;0m
|
||||
[0m[38;2;208;208;208m[48;2;0;0;0m{[0m[38;2;255;255;255m[48;2;0;0;0m
|
||||
[0m[38;2;208;208;208m[48;2;0;0;0m cout << [0m[38;2;237;157;19m[48;2;0;0;0m"Hello World"[0m[38;2;208;208;208m[48;2;0;0;0m << endl;[0m[38;2;255;255;255m[48;2;0;0;0m
|
||||
[0m[38;2;208;208;208m[48;2;0;0;0m}[0m[38;2;255;255;255m[48;2;0;0;0m
|
||||
[0m
|
||||
|
|
@ -123,7 +123,8 @@ class ToolsTestCase(unittest.TestCase):
|
|||
self._sub_tests([
|
||||
(tools.uncrustify, "closure-util.java", tools.Status.problem),
|
||||
(tools.uncrustify, "hello.c", tools.Status.normal),
|
||||
(tools.uncrustify, "hello.h", tools.Status.normal)])
|
||||
(tools.uncrustify, "hello.h", tools.Status.normal),
|
||||
(tools.uncrustify, "hello.cpp", tools.Status.normal)])
|
||||
|
||||
def test_splint(self):
|
||||
self._sub_tests([(tools.splint, "hello.c", tools.Status.ok),
|
||||
|
|
@ -141,6 +142,10 @@ class ToolsTestCase(unittest.TestCase):
|
|||
self._sub_tests([
|
||||
(tools.html2text, "hi.html", tools.Status.normal)])
|
||||
|
||||
def test_bcpp(self):
|
||||
self._sub_tests([
|
||||
(tools.bcpp, "hello.cpp", tools.Status.normal)])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
golden.main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue