Kill tabs dead! For good!

pull/3885/head
Jussi Pakkanen 6 years ago
parent d57498a4fd
commit b400cbe058
  1. 50
      manual tests/7 vala composite widgets/mywidget.vala
  2. 28
      run_project_tests.py
  3. 2
      test cases/common/106 subproject subdir/prog.c
  4. 2
      test cases/common/106 subproject subdir/subprojects/sub/lib/sub.c
  5. 2
      test cases/common/120 subdir subproject/prog/prog.c
  6. 2
      test cases/common/120 subdir subproject/subprojects/sub/sub.c
  7. 5
      test cases/common/124 test skip/test_skip.c
  8. 6
      test cases/common/126 llvm ir and assembly/square-arm.S
  9. 13
      test cases/common/126 llvm ir and assembly/square-x86.S
  10. 16
      test cases/common/126 llvm ir and assembly/square-x86_64.S
  11. 2
      test cases/common/84 extract from nested subdir/src/first/lib_first.c
  12. 2
      test cases/common/84 extract from nested subdir/tst/first/exe_first.c
  13. 2
      test cases/frameworks/4 qt/manualinclude.cpp
  14. 38
      test cases/nasm/1 configure file/hello.asm
  15. 2
      test cases/unit/14 testsetup selection/main.c
  16. 2
      test cases/unit/14 testsetup selection/subprojects/bar/bar.c
  17. 2
      test cases/unit/14 testsetup selection/subprojects/foo/foo.c
  18. 2
      test cases/vala/10 mixed sources/vala/bar.vala
  19. 72
      test cases/vala/5 target glib/GLib.Thread.vala
  20. 8
      test cases/vala/9 gir/foo.vala

@ -2,40 +2,40 @@ using Gtk;
[GtkTemplate (ui = "/org/foo/my/mywidget.ui")] [GtkTemplate (ui = "/org/foo/my/mywidget.ui")]
public class MyWidget : Box { public class MyWidget : Box {
public string text { public string text {
get { return entry.text; } get { return entry.text; }
set { entry.text = value; } set { entry.text = value; }
} }
[GtkChild] [GtkChild]
private Entry entry; private Entry entry;
public MyWidget (string text) { public MyWidget (string text) {
this.text = text; this.text = text;
} }
[GtkCallback] [GtkCallback]
private void on_button_clicked (Button button) { private void on_button_clicked (Button button) {
print ("The button was clicked with entry text: %s\n", entry.text); print ("The button was clicked with entry text: %s\n", entry.text);
} }
[GtkCallback] [GtkCallback]
private void on_entry_changed (Editable editable) { private void on_entry_changed (Editable editable) {
print ("The entry text changed: %s\n", entry.text); print ("The entry text changed: %s\n", entry.text);
notify_property ("text"); notify_property ("text");
} }
} }
void main(string[] args) { void main(string[] args) {
Gtk.init (ref args); Gtk.init (ref args);
var win = new Window(); var win = new Window();
win.destroy.connect (Gtk.main_quit); win.destroy.connect (Gtk.main_quit);
var widget = new MyWidget ("The entry text!"); var widget = new MyWidget ("The entry text!");
win.add (widget); win.add (widget);
win.show_all (); win.show_all ();
Gtk.main (); Gtk.main ();
} }

@ -636,10 +636,32 @@ def check_file(fname):
linenum += 1 linenum += 1
def check_format(): 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 (root, _, files) in os.walk('.'):
for file in files: if '.dub' in root: # external deps are here
if file.endswith('.py') or file.endswith('.build') or file == 'meson_options.txt': continue
fullname = os.path.join(root, file) 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) check_file(fullname)
def check_meson_commands_work(): def check_meson_commands_work():

@ -1,5 +1,5 @@
#include <sub.h> #include <sub.h>
int main() { int main() {
return sub(); return sub();
} }

@ -1,5 +1,5 @@
#include "sub.h" #include "sub.h"
int sub() { int sub() {
return 0; return 0;
} }

@ -1,5 +1,5 @@
#include <sub.h> #include <sub.h>
int main() { int main() {
return sub(); return sub();
} }

@ -1,5 +1,5 @@
#include "sub.h" #include "sub.h"
int sub() { int sub() {
return 0; return 0;
} }

@ -1,4 +1,3 @@
int main(int argc, char *argv[]) int main(int argc, char *argv[]) {
{ return 77;
return 77;
} }

@ -7,6 +7,6 @@
#endif #endif
SYMBOL_NAME(square_unsigned): SYMBOL_NAME(square_unsigned):
mul r1, r0, r0 mul r1, r0, r0
mov r0, r1 mov r0, r1
mov pc, lr mov pc, lr

@ -11,9 +11,10 @@ PUBLIC square_unsigned
_TEXT SEGMENT _TEXT SEGMENT
square_unsigned PROC var1:DWORD square_unsigned PROC var1:DWORD
mov eax, var1 mov eax, var1
imul eax, eax imul eax, eax
ret ret
square_unsigned ENDP square_unsigned ENDP
_TEXT ENDS _TEXT ENDS
@ -28,8 +29,8 @@ END
#endif #endif
SYMBOL_NAME(square_unsigned): SYMBOL_NAME(square_unsigned):
movl 4(%esp), %eax movl 4(%esp), %eax
imull %eax, %eax imull %eax, %eax
retl retl
#endif #endif

@ -7,8 +7,8 @@ _TEXT SEGMENT
SYMBOL_NAME(square_unsigned) PROC SYMBOL_NAME(square_unsigned) PROC
mov eax, ecx mov eax, ecx
imul eax, eax imul eax, eax
ret ret
SYMBOL_NAME(square_unsigned) ENDP SYMBOL_NAME(square_unsigned) ENDP
_TEXT ENDS _TEXT ENDS
@ -24,14 +24,14 @@ END
# if defined(_WIN32) || defined(__CYGWIN__) /* msabi */ # if defined(_WIN32) || defined(__CYGWIN__) /* msabi */
SYMBOL_NAME(square_unsigned): SYMBOL_NAME(square_unsigned):
imull %ecx, %ecx imull %ecx, %ecx
movl %ecx, %eax movl %ecx, %eax
retq retq
# else /* sysvabi */ # else /* sysvabi */
SYMBOL_NAME(square_unsigned): SYMBOL_NAME(square_unsigned):
imull %edi, %edi imull %edi, %edi
movl %edi, %eax movl %edi, %eax
retq retq
# endif # endif
#endif #endif

@ -1,3 +1,3 @@
int first() { int first() {
return 1001; return 1001;
} }

@ -1,5 +1,5 @@
int first(void); int first(void);
int main() { int main() {
return first() - 1001; return first() - 1001;
} }

@ -7,7 +7,7 @@ ManualInclude::ManualInclude() {
} }
void ManualInclude::myslot(void) { void ManualInclude::myslot(void) {
; ;
} }
class MocClass : public QObject { class MocClass : public QObject {

@ -1,27 +1,27 @@
; hello.asm a first program for nasm for Linux, Intel, gcc ; hello.asm a first program for nasm for Linux, Intel, gcc
; ;
; assemble: nasm -f elf -l hello.lst hello.asm ; assemble: nasm -f elf -l hello.lst hello.asm
; link: gcc -o hello hello.o ; link: gcc -o hello hello.o
; run: hello ; run: hello
; output is: Hello World ; output is: Hello World
%include "config.asm" %include "config.asm"
SECTION .data ; data section SECTION .data ; data section
msg: db "Hello World",10 ; the string to print, 10=cr msg: db "Hello World",10 ; the string to print, 10=cr
len: equ $-msg ; "$" means "here" len: equ $-msg ; "$" means "here"
; len is a value, not an address ; len is a value, not an address
SECTION .text ; code section SECTION .text ; code section
global main ; make label available to linker global main ; make label available to linker
main: ; standard gcc entry point main: ; standard gcc entry point
mov edx,len ; arg3, length of string to print mov edx,len ; arg3, length of string to print
mov ecx,msg ; arg2, pointer to string mov ecx,msg ; arg2, pointer to string
mov ebx,1 ; arg1, where to write, screen mov ebx,1 ; arg1, where to write, screen
mov eax,4 ; write sysout command to int 80 hex mov eax,4 ; write sysout command to int 80 hex
int 0x80 ; interrupt 80 hex, call kernel int 0x80 ; interrupt 80 hex, call kernel
mov ebx,HELLO ; exit code, 0=normal mov ebx,HELLO ; exit code, 0=normal
mov eax,1 ; exit command to kernel mov eax,1 ; exit command to kernel
int 0x80 ; interrupt 80 hex, call kernel int 0x80 ; interrupt 80 hex, call kernel

@ -1,3 +1,3 @@
int main() { int main() {
return 0; return 0;
} }

@ -1,3 +1,3 @@
int main() { int main() {
return 0; return 0;
} }

@ -1,3 +1,3 @@
int main() { int main() {
return 0; return 0;
} }

@ -1,5 +1,5 @@
extern int test (); extern int test ();
public int main (string[] args) { public int main (string[] args) {
return test (); return test ();
} }

@ -1,43 +1,43 @@
extern int get_ret_code (); extern int get_ret_code ();
public class MyThread : Object { public class MyThread : Object {
public int x_times { get; private set; } public int x_times { get; private set; }
public MyThread (int times) { public MyThread (int times) {
this.x_times = times; this.x_times = times;
} }
public int run () { public int run () {
for (int i = 0; i < this.x_times; i++) { for (int i = 0; i < this.x_times; i++) {
stdout.printf ("ping! %d/%d\n", i + 1, this.x_times); stdout.printf ("ping! %d/%d\n", i + 1, this.x_times);
Thread.usleep (10000); Thread.usleep (10000);
} }
// return & exit have the same effect // return & exit have the same effect
Thread.exit (get_ret_code ()); Thread.exit (get_ret_code ());
return 43; return 43;
} }
} }
public static int main (string[] args) { public static int main (string[] args) {
// Check whether threads are supported: // Check whether threads are supported:
if (Thread.supported () == false) { if (Thread.supported () == false) {
stderr.printf ("Threads are not supported!\n"); stderr.printf ("Threads are not supported!\n");
return -1; return -1;
} }
try { try {
// Start a thread: // Start a thread:
MyThread my_thread = new MyThread (10); MyThread my_thread = new MyThread (10);
Thread<int> thread = new Thread<int>.try ("My fst. thread", my_thread.run); Thread<int> thread = new Thread<int>.try ("My fst. thread", my_thread.run);
// Wait until thread finishes: // Wait until thread finishes:
int result = thread.join (); int result = thread.join ();
// Output: `Thread stopped! Return value: 42` // Output: `Thread stopped! Return value: 42`
stdout.printf ("Thread stopped! Return value: %d\n", result); stdout.printf ("Thread stopped! Return value: %d\n", result);
} catch (Error e) { } catch (Error e) {
stdout.printf ("Error: %s\n", e.message); stdout.printf ("Error: %s\n", e.message);
} }
return 0; return 0;
} }

@ -1,7 +1,7 @@
namespace Foo namespace Foo
{ {
public int bar () public int bar ()
{ {
return 0; return 0;
} }
} }

Loading…
Cancel
Save