-
Notifications
You must be signed in to change notification settings - Fork 2
/
GradeClass.java
34 lines (29 loc) · 984 Bytes
/
GradeClass.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package com.github.guillaumederval.javagrading;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
public @interface GradeClass {
/**
* The total value attributed to this test class.
*
* If -1, then each test will keep its original value.
* Else, the total for all the tests in this class will be divided by the maximum value and
* multiplied by totalValue.
*/
double totalValue() default -1.0;
/**
* Default value for each test in the class.
*/
double defaultValue() default 1.0;
/**
* If set to true, then all tests in the class must be ok to receive the grade
*/
boolean allCorrect() default false;
/**
* Default CPU timeout. Similar to the value cpuTimeout in @Grade.
*/
long defaultCpuTimeout() default 0L;
}