Skip to content

Commit

Permalink
sort files in subpackage
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinMeimar committed Oct 18, 2024
1 parent 89c1f74 commit 3c38595
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dragon_runner/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def gather_tests(self) -> List[TestFile]:
test_path = os.path.join(self.path, file)
if self.is_test(test_path):
tests.append(TestFile(test_path))
return tests
return sorted(tests, key=lambda x: x.file)

class Package(Verifiable):
"""
Expand Down
2 changes: 1 addition & 1 deletion tests/configs/runtimeConfigLinux.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
]
}
}


4 changes: 3 additions & 1 deletion tests/lib/src/fib.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ int fib(int n) {
return 1;
}
return fib(n-1) + fib(n-2);
}
}

int square(int n) { return n*n; }
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
int main() {
return 0;
}
15 changes: 15 additions & 0 deletions tests/packages/RuntimeCPackage/runtime/002_square.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include <stdio.h>

// Runtime config must supply the definition for fib
// **at runtime**

int square(int n);

int main() {

printf("%d\n", square(8));
return 0;
}

//CHECK:64
//CHECK:

0 comments on commit 3c38595

Please sign in to comment.