"expectsnot" metadata & other custom metadata

This question came up when a user wanted to test an operation and make sure an error was not thrown. On one hand, there is the expects="" metadata, which specifies what error the tests expects to throw:

[Test(expects="ReferenceError")]
public function shouldThrowArgumentError():void {
    throw( new ReferenceError() );
}

In one mode of thinking, the idea of an expectsnot="" metadata seems irrelevant, because by nature of a test passing, we know it is not throwing an error. For instance:

[Test]
public function shouldNotThrowError():void {
    var i:int = 5 + 2;
}

This test does not throw an error, and it passes by default, because no assertions have been made. All this being said, the purpose of this test is not immediately apparent from its operation. Fortunately, the name gives us some good clues on what it should do, but the metadata should also be able to help us with this process.

[Test(expectsnot="Error")]
public function shouldNotThrowError():void {
    var i:int = 5 + 2;
}

The expectsnot="" metadata has not been implemented as functional metadata in flexunit, but that doesn't actually matter. Fortunately, FlexUnit preserves all metadata that it does not understand. Added metadata of this kind does not affect output. Here are a few more examples:

[Test(team="Red")]
public function redTest():void {
    assertTrue( "Red" == "Red" );
}

[Test(team="Blue")]
public function blueTest():void {
    assertTrue( "Blue" == "Blue" );
}

[Test(team="Green")]
public function greenTest():void {
    assertTrue( "Green" == "Green" );
}

These tests are obviously meaningless, but the metadata does not affect their operation. Good test naming should give a good amount of information about the purpose of a test, but this is another way to clarify objectives.