Skip to content

Feature/#9/unittestsandjavadocs #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ kls_database.db
/database/
/benchmarks/
/suitablePrgms/
/testOutput/

# IDE specific folders
# IntelliJ
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies {
testImplementation("org.junit.jupiter:junit-jupiter:5.11.3")
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.11.3")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.11.3")
testImplementation("org.mockito:mockito-core:5.14.2")
testImplementation("org.mockito:mockito-core:4.11.0")
testImplementation("org.testng:testng:7.5.1")
}

Expand Down
2 changes: 1 addition & 1 deletion src/java/transform/Transformer.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public void transformFiles(int minTypeExpr, int minTypeCond, int minTypeParams,
parser.setCompilerOptions(options);
parser.setUnitName(file.getPath());

String[] classPath = {Paths.get("build", "classes").toString()};
String[] classPath = {Paths.get("build", "classes", "java").toString()};
String[] sourcePath = { Paths.get(Main.source).toString() , Paths.get("src").toString()};
parser.setEnvironment(classPath, sourcePath, new String[] { "UTF-8", "UTF-8" }, true);

Expand Down
2 changes: 1 addition & 1 deletion src/java/transform/TypeChecking/TypeChecker.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ private static boolean inJavaLangLibrary(Type type) {
* @param type
* @return true if the type is allowed, false otherwise.
*/
public static boolean allowedType(Type type) {
public boolean allowedType(Type type) {
if(type == null) return false;

if(type.isArrayType()) {
Expand Down
4 changes: 2 additions & 2 deletions src/java/transform/visitors/SymbolTableVisitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public boolean visit(MethodDeclaration node) {
* the method getMethodSTEName(), where we only consider primitive type
* parameters).
*/
if (!TypeChecker.allowedType(type)) {
if (!typeChecker.allowedType(type)) {
return false;
}
}
Expand Down Expand Up @@ -125,7 +125,7 @@ public void endVisit(MethodDeclaration node) {
* we did not create a symbol table element for it and thus
* there is nothing to pop.
*/
if (!TypeChecker.allowedType(type)) {
if (!typeChecker.allowedType(type)) {
pushedMethod = false;
}
}
Expand Down
Loading
Loading