Correction bug + ajout test d'un autre groupe
This commit is contained in:
parent
15a06d738f
commit
99d9e4efbe
src/fr/monlouyan/bakefile
tests/tests-autres-groupes/lenny-khalid-thomas/test-6-Dependance-Circulaire
@ -50,6 +50,7 @@ public class CommandExecutor {
|
||||
public void execute(Rule rule) {
|
||||
// On vérifie d'abord si cette règle a besoin d'être mise à jour
|
||||
boolean ruleNeedsUpdate = rule.needsUpdate();
|
||||
|
||||
if (ruleNeedsUpdate) {
|
||||
needsUpdate = true; // Au moins une règle doit être mise à jour
|
||||
|
||||
@ -89,7 +90,7 @@ public class CommandExecutor {
|
||||
actualCommand = actualCommand.substring(1).trim();
|
||||
}
|
||||
|
||||
if (isCircular){
|
||||
if (isCircular && needsUpdate){
|
||||
if (!silent && displayLines != null && !displayLines.isEmpty()) {
|
||||
boolean isFirstLine = true;
|
||||
for (String line : displayLines) {
|
||||
|
27
tests/tests-autres-groupes/lenny-khalid-thomas/test-6-Dependance-Circulaire/bake/Bakefile
Normal file
27
tests/tests-autres-groupes/lenny-khalid-thomas/test-6-Dependance-Circulaire/bake/Bakefile
Normal file
@ -0,0 +1,27 @@
|
||||
# Variables
|
||||
JC = javac
|
||||
JFLAGS = -g
|
||||
|
||||
# Cible par défaut
|
||||
all: TestMain.class
|
||||
|
||||
# Dépendance circulaire délibérée
|
||||
FunctionA.class: FunctionA.java FunctionB.class
|
||||
$(JC) $(JFLAGS) FunctionA.java
|
||||
|
||||
FunctionB.class: FunctionB.java FunctionC.class
|
||||
$(JC) $(JFLAGS) FunctionB.java
|
||||
|
||||
FunctionC.class: FunctionC.java FunctionA.class
|
||||
$(JC) $(JFLAGS) FunctionC.java
|
||||
|
||||
# Cible principale
|
||||
TestMain.class: TestMain.java FunctionA.class FunctionB.class FunctionC.class
|
||||
$(JC) $(JFLAGS) TestMain.java
|
||||
|
||||
# Nettoyage
|
||||
clean:
|
||||
rm -f *.class
|
||||
|
||||
# Cibles spéciales
|
||||
.PHONY: all clean
|
5
tests/tests-autres-groupes/lenny-khalid-thomas/test-6-Dependance-Circulaire/bake/FunctionA.java
Normal file
5
tests/tests-autres-groupes/lenny-khalid-thomas/test-6-Dependance-Circulaire/bake/FunctionA.java
Normal file
@ -0,0 +1,5 @@
|
||||
public class FunctionA {
|
||||
public static void execute() {
|
||||
System.out.println("Function A");
|
||||
}
|
||||
}
|
5
tests/tests-autres-groupes/lenny-khalid-thomas/test-6-Dependance-Circulaire/bake/FunctionB.java
Normal file
5
tests/tests-autres-groupes/lenny-khalid-thomas/test-6-Dependance-Circulaire/bake/FunctionB.java
Normal file
@ -0,0 +1,5 @@
|
||||
public class FunctionB {
|
||||
public static void execute() {
|
||||
System.out.println("Function B");
|
||||
}
|
||||
}
|
5
tests/tests-autres-groupes/lenny-khalid-thomas/test-6-Dependance-Circulaire/bake/FunctionC.java
Normal file
5
tests/tests-autres-groupes/lenny-khalid-thomas/test-6-Dependance-Circulaire/bake/FunctionC.java
Normal file
@ -0,0 +1,5 @@
|
||||
public class FunctionC {
|
||||
public static void execute() {
|
||||
System.out.println("Function C");
|
||||
}
|
||||
}
|
11
tests/tests-autres-groupes/lenny-khalid-thomas/test-6-Dependance-Circulaire/bake/TestMain.java
Normal file
11
tests/tests-autres-groupes/lenny-khalid-thomas/test-6-Dependance-Circulaire/bake/TestMain.java
Normal file
@ -0,0 +1,11 @@
|
||||
public class TestMain {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Lancement du programme de test...");
|
||||
|
||||
FunctionA.execute();
|
||||
FunctionB.execute();
|
||||
FunctionC.execute();
|
||||
|
||||
System.out.println("Programme de test effectué.");
|
||||
}
|
||||
}
|
5
tests/tests-autres-groupes/lenny-khalid-thomas/test-6-Dependance-Circulaire/make/FunctionA.java
Normal file
5
tests/tests-autres-groupes/lenny-khalid-thomas/test-6-Dependance-Circulaire/make/FunctionA.java
Normal file
@ -0,0 +1,5 @@
|
||||
public class FunctionA {
|
||||
public static void execute() {
|
||||
System.out.println("Function A");
|
||||
}
|
||||
}
|
5
tests/tests-autres-groupes/lenny-khalid-thomas/test-6-Dependance-Circulaire/make/FunctionB.java
Normal file
5
tests/tests-autres-groupes/lenny-khalid-thomas/test-6-Dependance-Circulaire/make/FunctionB.java
Normal file
@ -0,0 +1,5 @@
|
||||
public class FunctionB {
|
||||
public static void execute() {
|
||||
System.out.println("Function B");
|
||||
}
|
||||
}
|
5
tests/tests-autres-groupes/lenny-khalid-thomas/test-6-Dependance-Circulaire/make/FunctionC.java
Normal file
5
tests/tests-autres-groupes/lenny-khalid-thomas/test-6-Dependance-Circulaire/make/FunctionC.java
Normal file
@ -0,0 +1,5 @@
|
||||
public class FunctionC {
|
||||
public static void execute() {
|
||||
System.out.println("Function C");
|
||||
}
|
||||
}
|
27
tests/tests-autres-groupes/lenny-khalid-thomas/test-6-Dependance-Circulaire/make/Makefile
Normal file
27
tests/tests-autres-groupes/lenny-khalid-thomas/test-6-Dependance-Circulaire/make/Makefile
Normal file
@ -0,0 +1,27 @@
|
||||
# Variables
|
||||
JC = javac
|
||||
JFLAGS = -g
|
||||
|
||||
# Cible par défaut
|
||||
all: TestMain.class
|
||||
|
||||
# Dépendance circulaire délibérée
|
||||
FunctionA.class: FunctionA.java FunctionB.class
|
||||
$(JC) $(JFLAGS) FunctionA.java
|
||||
|
||||
FunctionB.class: FunctionB.java FunctionC.class
|
||||
$(JC) $(JFLAGS) FunctionB.java
|
||||
|
||||
FunctionC.class: FunctionC.java FunctionA.class
|
||||
$(JC) $(JFLAGS) FunctionC.java
|
||||
|
||||
# Cible principale
|
||||
TestMain.class: TestMain.java FunctionA.class FunctionB.class FunctionC.class
|
||||
$(JC) $(JFLAGS) TestMain.java
|
||||
|
||||
# Nettoyage
|
||||
clean:
|
||||
rm -f *.class
|
||||
|
||||
# Cibles spéciales
|
||||
.PHONY: all clean
|
11
tests/tests-autres-groupes/lenny-khalid-thomas/test-6-Dependance-Circulaire/make/TestMain.java
Normal file
11
tests/tests-autres-groupes/lenny-khalid-thomas/test-6-Dependance-Circulaire/make/TestMain.java
Normal file
@ -0,0 +1,11 @@
|
||||
public class TestMain {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Lancement du programme de test...");
|
||||
|
||||
FunctionA.execute();
|
||||
FunctionB.execute();
|
||||
FunctionC.execute();
|
||||
|
||||
System.out.println("Programme de test effectué.");
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user