<commit_before>"Represents a condition which has to be fullfiled to execute test, 
 in other case the test execution is [[skipped|TestState.skipped]].
 The [[ignore]] annotation is one simple implementation of this mechanism.
 
 The example below shows `bug` annotation, which allow to skip test, 
 until the reported issue is resolved. 
 
     shared annotation bug(String id) => BugAnnotation(id);
     
     shared final annotation class BugAnnotation(String id)
              satisfies OptionalAnnotation<BugAnnotation,FunctionDeclaration> & TestCondition {
         
         shared actual Result evaluate(TestDescription description) {
             // check if the issue is already resolved
         }
         
     } 
 
     test
     bug(\"1205\")
     shared void shouldTestSomethingButThereIsBug() {
     }
 
"
shared interface TestCondition {
    
    "Evaluate the condition for the given test."
    shared formal Result evaluate(TestDescription description);
    
    "The result of evaluating."
    shared class Result(successful, reason = null) {
        
        "The flag if the condition was fulfilled or not."
        shared Boolean successful;
        
        "The reason why the test is skipped."
        shared String? reason;
        
        /*
        new init(Boolean successful, String? reason) {
            successful = successful; 
            reason = reason2;
        }
        
        shared new success(String reason) extends init(true, reason) {}
        
        shared new failed(String reason) extends init(false, reason) {}
         */
        
    }
    
}<commit_msg>ceylon.test: workaround info #470<commit_after>"Represents a condition which has to be fullfiled to execute test, 
 in other case the test execution is [[skipped|TestState.skipped]].
 The [[ignore]] annotation is one simple implementation of this mechanism.
 
 The example below shows `bug` annotation, which allow to skip test, 
 until the reported issue is resolved. 
 
     shared annotation bug(String id) => BugAnnotation(id);
     
     shared final annotation class BugAnnotation(String id)
              satisfies OptionalAnnotation<BugAnnotation,FunctionDeclaration> & TestCondition {
         
         shared actual Result evaluate(TestDescription description) {
             // check if the issue is already resolved
         }
         
     } 
 
     test
     bug(\"1205\")
     shared void shouldTestSomethingButThereIsBug() {
     }
 
"
shared interface TestCondition {
    
    "Evaluate the condition for the given test."
    shared formal Result evaluate(TestDescription description);
    
    "The result of evaluating."
    shared class Result(successful, reason = null) {
        
        "The flag if the condition was fulfilled or not."
        shared Boolean successful;
        
        "The reason why the test is skipped."
        shared String? reason;
        
        /*
         
        WORKAROUND Can't invoke ctor of nested class #5785
        https://github.com/ceylon/ceylon/issues/5785
         
        new init(Boolean successful, String? reason) {
            successful = successful; 
            reason = reason2;
        }
        
        shared new success(String reason) extends init(true, reason) {}
        
        shared new failed(String reason) extends init(false, reason) {}
         
        */
        
    }
    
}
{'fraction_non_alphanumeric': 0.06769139816730713, 'fraction_numerical': 0.006207508128879693, 'mean_word_length': 2.180451127819549, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1444623', 'n_tokens_mistral': 839, 'n_tokens_neox': 789, 'n_words': 304}