detached 7f06ba5

move C tests into testdata/ (#203)

These don't have public API so move them into testdata to cleanup root folder
commit
7f06ba577b0bfadad5aac2dd80350b02ba8d43e4
author
TotallyGamerJet · · 2024-01-18 19:33 UTC
committer
GitHub · · 2024-01-18 19:33 UTC
parent
886e3a0
signature
GPG UnverifiedB5690EEEBB952194 The key is unknown
6 files · +3 -3
M callback_test.go +1 -1
@@ -20,7 +20,7 @@ func TestCallGoFromSharedLib(t *testing.T) {
2020 libFileName := filepath.Join(t.TempDir(), "libcbtest.so")
2121 t.Logf("Build %v", libFileName)
2222
23- if err := buildSharedLib("CC", libFileName, filepath.Join("libcbtest", "callback_test.c")); err != nil {
23+ if err := buildSharedLib("CC", libFileName, filepath.Join("testdata", "libcbtest", "callback_test.c")); err != nil {
2424 t.Fatal(err)
2525 }
2626 defer os.Remove(libFileName)
@@ -20,7 +20,7 @@ func TestCallGoFromSharedLib(t *testing.T) {
20 libFileName := filepath.Join(t.TempDir(), "libcbtest.so")20 libFileName := filepath.Join(t.TempDir(), "libcbtest.so")
21 t.Logf("Build %v", libFileName)21 t.Logf("Build %v", libFileName)
22 22
23- if err := buildSharedLib("CC", libFileName, filepath.Join("libcbtest", "callback_test.c")); err != nil {23+ if err := buildSharedLib("CC", libFileName, filepath.Join("testdata", "libcbtest", "callback_test.c")); err != nil {
24 t.Fatal(err)24 t.Fatal(err)
25 }25 }
26 defer os.Remove(libFileName)26 defer os.Remove(libFileName)
M dlfcn_test.go +1 -1
@@ -28,7 +28,7 @@ func TestNestedDlopenCall(t *testing.T) {
2828 libFileName := filepath.Join(t.TempDir(), "libdlnested.so")
2929 t.Logf("Build %v", libFileName)
3030
31- if err := buildSharedLib("CXX", libFileName, filepath.Join("libdlnested", "nested_test.cpp")); err != nil {
31+ if err := buildSharedLib("CXX", libFileName, filepath.Join("testdata", "libdlnested", "nested_test.cpp")); err != nil {
3232 t.Fatal(err)
3333 }
3434 defer os.Remove(libFileName)
@@ -28,7 +28,7 @@ func TestNestedDlopenCall(t *testing.T) {
28 libFileName := filepath.Join(t.TempDir(), "libdlnested.so")28 libFileName := filepath.Join(t.TempDir(), "libdlnested.so")
29 t.Logf("Build %v", libFileName)29 t.Logf("Build %v", libFileName)
30 30
31- if err := buildSharedLib("CXX", libFileName, filepath.Join("libdlnested", "nested_test.cpp")); err != nil {31+ if err := buildSharedLib("CXX", libFileName, filepath.Join("testdata", "libdlnested", "nested_test.cpp")); err != nil {
32 t.Fatal(err)32 t.Fatal(err)
33 }33 }
34 defer os.Remove(libFileName)34 defer os.Remove(libFileName)
M struct_test.go +1 -1
@@ -17,7 +17,7 @@ func TestRegisterFunc_structArgs(t *testing.T) {
1717 libFileName := filepath.Join(t.TempDir(), "structtest.so")
1818 t.Logf("Build %v", libFileName)
1919
20- if err := buildSharedLib("CC", libFileName, filepath.Join("structtest", "struct_test.c")); err != nil {
20+ if err := buildSharedLib("CC", libFileName, filepath.Join("testdata", "structtest", "struct_test.c")); err != nil {
2121 t.Fatal(err)
2222 }
2323 defer os.Remove(libFileName)
@@ -17,7 +17,7 @@ func TestRegisterFunc_structArgs(t *testing.T) {
17 libFileName := filepath.Join(t.TempDir(), "structtest.so")17 libFileName := filepath.Join(t.TempDir(), "structtest.so")
18 t.Logf("Build %v", libFileName)18 t.Logf("Build %v", libFileName)
19 19
20- if err := buildSharedLib("CC", libFileName, filepath.Join("structtest", "struct_test.c")); err != nil {20+ if err := buildSharedLib("CC", libFileName, filepath.Join("testdata", "structtest", "struct_test.c")); err != nil {
21 t.Fatal(err)21 t.Fatal(err)
22 }22 }
23 defer os.Remove(libFileName)23 defer os.Remove(libFileName)
R libcbtest/callback_test.c → testdata/libcbtest/callback_test.c +0 -0 renamed, 100% similar

renamed, 100% similar

R libdlnested/nested_test.cpp → testdata/libdlnested/nested_test.cpp +0 -0 renamed, 100% similar

renamed, 100% similar

R structtest/struct_test.c → testdata/structtest/struct_test.c +0 -0 renamed, 100% similar

renamed, 100% similar

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 102

↑↓ moveenter openesc close