summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-08-14 21:48:51 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2018-08-15 18:52:56 +0300
commita1f514305acc9ec8ea504004580ba2fad609bcd7 (patch)
treefe2dfe35f3fd9f9adb71c35042830cb813779f3e
parent9b3671e711619505e9bd422cbc328c0078154bc9 (diff)
downloadmeson-tabkiller.tar.gz
Kill tabs dead! For good!tabkiller
-rw-r--r--manual tests/7 vala composite widgets/mywidget.vala50
-rwxr-xr-xrun_project_tests.py28
-rw-r--r--test cases/common/106 subproject subdir/prog.c2
-rw-r--r--test cases/common/106 subproject subdir/subprojects/sub/lib/sub.c2
-rw-r--r--test cases/common/120 subdir subproject/prog/prog.c2
-rw-r--r--test cases/common/120 subdir subproject/subprojects/sub/sub.c2
-rw-r--r--test cases/common/124 test skip/test_skip.c5
-rw-r--r--test cases/common/126 llvm ir and assembly/square-arm.S6
-rw-r--r--test cases/common/126 llvm ir and assembly/square-x86.S13
-rw-r--r--test cases/common/126 llvm ir and assembly/square-x86_64.S16
-rw-r--r--test cases/common/84 extract from nested subdir/src/first/lib_first.c2
-rw-r--r--test cases/common/84 extract from nested subdir/tst/first/exe_first.c2
-rw-r--r--test cases/frameworks/4 qt/manualinclude.cpp2
-rw-r--r--test cases/nasm/1 configure file/hello.asm38
-rw-r--r--test cases/unit/14 testsetup selection/main.c2
-rw-r--r--test cases/unit/14 testsetup selection/subprojects/bar/bar.c2
-rw-r--r--test cases/unit/14 testsetup selection/subprojects/foo/foo.c2
-rw-r--r--test cases/vala/10 mixed sources/vala/bar.vala2
-rw-r--r--test cases/vala/5 target glib/GLib.Thread.vala72
-rw-r--r--test cases/vala/9 gir/foo.vala8
20 files changed, 140 insertions, 118 deletions
diff --git a/manual tests/7 vala composite widgets/mywidget.vala b/manual tests/7 vala composite widgets/mywidget.vala
index 09a2064ca..68eaecc27 100644
--- a/manual tests/7 vala composite widgets/mywidget.vala
+++ b/manual tests/7 vala composite widgets/mywidget.vala
@@ -2,40 +2,40 @@ using Gtk;
[GtkTemplate (ui = "/org/foo/my/mywidget.ui")]
public class MyWidget : Box {
- public string text {
- get { return entry.text; }
- set { entry.text = value; }
- }
+ public string text {
+ get { return entry.text; }
+ set { entry.text = value; }
+ }
- [GtkChild]
- private Entry entry;
+ [GtkChild]
+ private Entry entry;
- public MyWidget (string text) {
- this.text = text;
- }
+ public MyWidget (string text) {
+ this.text = text;
+ }
- [GtkCallback]
- private void on_button_clicked (Button button) {
- print ("The button was clicked with entry text: %s\n", entry.text);
- }
+ [GtkCallback]
+ private void on_button_clicked (Button button) {
+ print ("The button was clicked with entry text: %s\n", entry.text);
+ }
- [GtkCallback]
- private void on_entry_changed (Editable editable) {
- print ("The entry text changed: %s\n", entry.text);
+ [GtkCallback]
+ private void on_entry_changed (Editable editable) {
+ print ("The entry text changed: %s\n", entry.text);
- notify_property ("text");
- }
+ notify_property ("text");
+ }
}
void main(string[] args) {
- Gtk.init (ref args);
- var win = new Window();
- win.destroy.connect (Gtk.main_quit);
+ Gtk.init (ref args);
+ var win = new Window();
+ win.destroy.connect (Gtk.main_quit);
- var widget = new MyWidget ("The entry text!");
+ var widget = new MyWidget ("The entry text!");
- win.add (widget);
- win.show_all ();
+ win.add (widget);
+ win.show_all ();
- Gtk.main ();
+ Gtk.main ();
}
diff --git a/run_project_tests.py b/run_project_tests.py
index 1385a78af..e390aaf86 100755
--- a/run_project_tests.py
+++ b/run_project_tests.py
@@ -636,10 +636,32 @@ def check_file(fname):
linenum += 1
def check_format():
+ check_suffixes = {'.c',
+ '.cpp',
+ '.cxx',
+ '.cc',
+ '.rs',
+ '.f90',
+ '.vala',
+ '.d',
+ '.s',
+ '.m',
+ '.mm',
+ '.asm',
+ '.java',
+ '.txt',
+ '.py',
+ '.swift',
+ '.build',
+ }
for (root, _, files) in os.walk('.'):
- for file in files:
- if file.endswith('.py') or file.endswith('.build') or file == 'meson_options.txt':
- fullname = os.path.join(root, file)
+ if '.dub' in root: # external deps are here
+ continue
+ for fname in files:
+ if os.path.splitext(fname)[1].lower() in check_suffixes:
+ if os.path.split(fname)[1] == 'sitemap.txt':
+ continue
+ fullname = os.path.join(root, fname)
check_file(fullname)
def check_meson_commands_work():
diff --git a/test cases/common/106 subproject subdir/prog.c b/test cases/common/106 subproject subdir/prog.c
index 02ae3372d..cf6f42548 100644
--- a/test cases/common/106 subproject subdir/prog.c
+++ b/test cases/common/106 subproject subdir/prog.c
@@ -1,5 +1,5 @@
#include <sub.h>
int main() {
- return sub();
+ return sub();
}
diff --git a/test cases/common/106 subproject subdir/subprojects/sub/lib/sub.c b/test cases/common/106 subproject subdir/subprojects/sub/lib/sub.c
index 3291e3cb1..068a5b89c 100644
--- a/test cases/common/106 subproject subdir/subprojects/sub/lib/sub.c
+++ b/test cases/common/106 subproject subdir/subprojects/sub/lib/sub.c
@@ -1,5 +1,5 @@
#include "sub.h"
int sub() {
- return 0;
+ return 0;
}
diff --git a/test cases/common/120 subdir subproject/prog/prog.c b/test cases/common/120 subdir subproject/prog/prog.c
index 02ae3372d..cf6f42548 100644
--- a/test cases/common/120 subdir subproject/prog/prog.c
+++ b/test cases/common/120 subdir subproject/prog/prog.c
@@ -1,5 +1,5 @@
#include <sub.h>
int main() {
- return sub();
+ return sub();
}
diff --git a/test cases/common/120 subdir subproject/subprojects/sub/sub.c b/test cases/common/120 subdir subproject/subprojects/sub/sub.c
index 3291e3cb1..068a5b89c 100644
--- a/test cases/common/120 subdir subproject/subprojects/sub/sub.c
+++ b/test cases/common/120 subdir subproject/subprojects/sub/sub.c
@@ -1,5 +1,5 @@
#include "sub.h"
int sub() {
- return 0;
+ return 0;
}
diff --git a/test cases/common/124 test skip/test_skip.c b/test cases/common/124 test skip/test_skip.c
index d050a610b..db26681e1 100644
--- a/test cases/common/124 test skip/test_skip.c
+++ b/test cases/common/124 test skip/test_skip.c
@@ -1,4 +1,3 @@
-int main(int argc, char *argv[])
-{
- return 77;
+int main(int argc, char *argv[]) {
+ return 77;
}
diff --git a/test cases/common/126 llvm ir and assembly/square-arm.S b/test cases/common/126 llvm ir and assembly/square-arm.S
index e66fa4790..4dd446753 100644
--- a/test cases/common/126 llvm ir and assembly/square-arm.S
+++ b/test cases/common/126 llvm ir and assembly/square-arm.S
@@ -7,6 +7,6 @@
#endif
SYMBOL_NAME(square_unsigned):
- mul r1, r0, r0
- mov r0, r1
- mov pc, lr
+ mul r1, r0, r0
+ mov r0, r1
+ mov pc, lr
diff --git a/test cases/common/126 llvm ir and assembly/square-x86.S b/test cases/common/126 llvm ir and assembly/square-x86.S
index 7d1202a76..18284c1a6 100644
--- a/test cases/common/126 llvm ir and assembly/square-x86.S
+++ b/test cases/common/126 llvm ir and assembly/square-x86.S
@@ -11,9 +11,10 @@ PUBLIC square_unsigned
_TEXT SEGMENT
square_unsigned PROC var1:DWORD
- mov eax, var1
- imul eax, eax
- ret
+ mov eax, var1
+ imul eax, eax
+ ret
+
square_unsigned ENDP
_TEXT ENDS
@@ -28,8 +29,8 @@ END
#endif
SYMBOL_NAME(square_unsigned):
- movl 4(%esp), %eax
- imull %eax, %eax
- retl
+ movl 4(%esp), %eax
+ imull %eax, %eax
+ retl
#endif
diff --git a/test cases/common/126 llvm ir and assembly/square-x86_64.S b/test cases/common/126 llvm ir and assembly/square-x86_64.S
index 09cc7a4d0..5678d00a3 100644
--- a/test cases/common/126 llvm ir and assembly/square-x86_64.S
+++ b/test cases/common/126 llvm ir and assembly/square-x86_64.S
@@ -7,8 +7,8 @@ _TEXT SEGMENT
SYMBOL_NAME(square_unsigned) PROC
mov eax, ecx
- imul eax, eax
- ret
+ imul eax, eax
+ ret
SYMBOL_NAME(square_unsigned) ENDP
_TEXT ENDS
@@ -24,14 +24,14 @@ END
# if defined(_WIN32) || defined(__CYGWIN__) /* msabi */
SYMBOL_NAME(square_unsigned):
- imull %ecx, %ecx
- movl %ecx, %eax
- retq
+ imull %ecx, %ecx
+ movl %ecx, %eax
+ retq
# else /* sysvabi */
SYMBOL_NAME(square_unsigned):
- imull %edi, %edi
- movl %edi, %eax
- retq
+ imull %edi, %edi
+ movl %edi, %eax
+ retq
# endif
#endif
diff --git a/test cases/common/84 extract from nested subdir/src/first/lib_first.c b/test cases/common/84 extract from nested subdir/src/first/lib_first.c
index 01e06b62f..30049063f 100644
--- a/test cases/common/84 extract from nested subdir/src/first/lib_first.c
+++ b/test cases/common/84 extract from nested subdir/src/first/lib_first.c
@@ -1,3 +1,3 @@
int first() {
- return 1001;
+ return 1001;
}
diff --git a/test cases/common/84 extract from nested subdir/tst/first/exe_first.c b/test cases/common/84 extract from nested subdir/tst/first/exe_first.c
index 4f714df2c..f6c1f7471 100644
--- a/test cases/common/84 extract from nested subdir/tst/first/exe_first.c
+++ b/test cases/common/84 extract from nested subdir/tst/first/exe_first.c
@@ -1,5 +1,5 @@
int first(void);
int main() {
- return first() - 1001;
+ return first() - 1001;
}
diff --git a/test cases/frameworks/4 qt/manualinclude.cpp b/test cases/frameworks/4 qt/manualinclude.cpp
index 6c1ac2f1c..2682dd9d2 100644
--- a/test cases/frameworks/4 qt/manualinclude.cpp
+++ b/test cases/frameworks/4 qt/manualinclude.cpp
@@ -7,7 +7,7 @@ ManualInclude::ManualInclude() {
}
void ManualInclude::myslot(void) {
- ;
+ ;
}
class MocClass : public QObject {
diff --git a/test cases/nasm/1 configure file/hello.asm b/test cases/nasm/1 configure file/hello.asm
index 4188b8dfe..bf4bf9688 100644
--- a/test cases/nasm/1 configure file/hello.asm
+++ b/test cases/nasm/1 configure file/hello.asm
@@ -1,27 +1,27 @@
; hello.asm a first program for nasm for Linux, Intel, gcc
;
-; assemble: nasm -f elf -l hello.lst hello.asm
-; link: gcc -o hello hello.o
-; run: hello
-; output is: Hello World
+; assemble: nasm -f elf -l hello.lst hello.asm
+; link: gcc -o hello hello.o
+; run: hello
+; output is: Hello World
%include "config.asm"
- SECTION .data ; data section
-msg: db "Hello World",10 ; the string to print, 10=cr
-len: equ $-msg ; "$" means "here"
- ; len is a value, not an address
+ SECTION .data ; data section
+msg: db "Hello World",10 ; the string to print, 10=cr
+len: equ $-msg ; "$" means "here"
+ ; len is a value, not an address
- SECTION .text ; code section
- global main ; make label available to linker
-main: ; standard gcc entry point
+ SECTION .text ; code section
+ global main ; make label available to linker
+main: ; standard gcc entry point
- mov edx,len ; arg3, length of string to print
- mov ecx,msg ; arg2, pointer to string
- mov ebx,1 ; arg1, where to write, screen
- mov eax,4 ; write sysout command to int 80 hex
- int 0x80 ; interrupt 80 hex, call kernel
+ mov edx,len ; arg3, length of string to print
+ mov ecx,msg ; arg2, pointer to string
+ mov ebx,1 ; arg1, where to write, screen
+ mov eax,4 ; write sysout command to int 80 hex
+ int 0x80 ; interrupt 80 hex, call kernel
- mov ebx,HELLO ; exit code, 0=normal
- mov eax,1 ; exit command to kernel
- int 0x80 ; interrupt 80 hex, call kernel
+ mov ebx,HELLO ; exit code, 0=normal
+ mov eax,1 ; exit command to kernel
+ int 0x80 ; interrupt 80 hex, call kernel
diff --git a/test cases/unit/14 testsetup selection/main.c b/test cases/unit/14 testsetup selection/main.c
index cb3f7482f..33c14ce1d 100644
--- a/test cases/unit/14 testsetup selection/main.c
+++ b/test cases/unit/14 testsetup selection/main.c
@@ -1,3 +1,3 @@
int main() {
- return 0;
+ return 0;
}
diff --git a/test cases/unit/14 testsetup selection/subprojects/bar/bar.c b/test cases/unit/14 testsetup selection/subprojects/bar/bar.c
index cb3f7482f..33c14ce1d 100644
--- a/test cases/unit/14 testsetup selection/subprojects/bar/bar.c
+++ b/test cases/unit/14 testsetup selection/subprojects/bar/bar.c
@@ -1,3 +1,3 @@
int main() {
- return 0;
+ return 0;
}
diff --git a/test cases/unit/14 testsetup selection/subprojects/foo/foo.c b/test cases/unit/14 testsetup selection/subprojects/foo/foo.c
index cb3f7482f..33c14ce1d 100644
--- a/test cases/unit/14 testsetup selection/subprojects/foo/foo.c
+++ b/test cases/unit/14 testsetup selection/subprojects/foo/foo.c
@@ -1,3 +1,3 @@
int main() {
- return 0;
+ return 0;
}
diff --git a/test cases/vala/10 mixed sources/vala/bar.vala b/test cases/vala/10 mixed sources/vala/bar.vala
index 10dce1ee9..0772f3edc 100644
--- a/test cases/vala/10 mixed sources/vala/bar.vala
+++ b/test cases/vala/10 mixed sources/vala/bar.vala
@@ -1,5 +1,5 @@
extern int test ();
public int main (string[] args) {
- return test ();
+ return test ();
}
diff --git a/test cases/vala/5 target glib/GLib.Thread.vala b/test cases/vala/5 target glib/GLib.Thread.vala
index a1a0414cd..701882180 100644
--- a/test cases/vala/5 target glib/GLib.Thread.vala
+++ b/test cases/vala/5 target glib/GLib.Thread.vala
@@ -1,43 +1,43 @@
extern int get_ret_code ();
public class MyThread : Object {
- public int x_times { get; private set; }
-
- public MyThread (int times) {
- this.x_times = times;
- }
-
- public int run () {
- for (int i = 0; i < this.x_times; i++) {
- stdout.printf ("ping! %d/%d\n", i + 1, this.x_times);
- Thread.usleep (10000);
- }
-
- // return & exit have the same effect
- Thread.exit (get_ret_code ());
- return 43;
- }
+ public int x_times { get; private set; }
+
+ public MyThread (int times) {
+ this.x_times = times;
+ }
+
+ public int run () {
+ for (int i = 0; i < this.x_times; i++) {
+ stdout.printf ("ping! %d/%d\n", i + 1, this.x_times);
+ Thread.usleep (10000);
+ }
+
+ // return & exit have the same effect
+ Thread.exit (get_ret_code ());
+ return 43;
+ }
}
public static int main (string[] args) {
- // Check whether threads are supported:
- if (Thread.supported () == false) {
- stderr.printf ("Threads are not supported!\n");
- return -1;
- }
-
- try {
- // Start a thread:
- MyThread my_thread = new MyThread (10);
- Thread<int> thread = new Thread<int>.try ("My fst. thread", my_thread.run);
-
- // Wait until thread finishes:
- int result = thread.join ();
- // Output: `Thread stopped! Return value: 42`
- stdout.printf ("Thread stopped! Return value: %d\n", result);
- } catch (Error e) {
- stdout.printf ("Error: %s\n", e.message);
- }
-
- return 0;
+ // Check whether threads are supported:
+ if (Thread.supported () == false) {
+ stderr.printf ("Threads are not supported!\n");
+ return -1;
+ }
+
+ try {
+ // Start a thread:
+ MyThread my_thread = new MyThread (10);
+ Thread<int> thread = new Thread<int>.try ("My fst. thread", my_thread.run);
+
+ // Wait until thread finishes:
+ int result = thread.join ();
+ // Output: `Thread stopped! Return value: 42`
+ stdout.printf ("Thread stopped! Return value: %d\n", result);
+ } catch (Error e) {
+ stdout.printf ("Error: %s\n", e.message);
+ }
+
+ return 0;
}
diff --git a/test cases/vala/9 gir/foo.vala b/test cases/vala/9 gir/foo.vala
index 00c48121a..bb6da1066 100644
--- a/test cases/vala/9 gir/foo.vala
+++ b/test cases/vala/9 gir/foo.vala
@@ -1,7 +1,7 @@
namespace Foo
{
- public int bar ()
- {
- return 0;
- }
+ public int bar ()
+ {
+ return 0;
+ }
}