我試圖使用Flashbuilder 4.7環境附帶的Hamcrest匹配器。我有2個數組,數組A和數組B.我想要做的是確保所有B的成員都在A中找到,而不管順序如何。我正在尋找這樣的作品。AS3 Hamcrest - 聲明一個數組包含所有其他數組
var a:Array = new Array(1, 2, 3, 4);
var b:Array = new Array(1, 2, 3, 4);
//Both arrays contain the same values so this should
//return true
assertThat(a , hasEachAndEveryLastOneInsideOfIt(b));
現在我已經嘗試過'allOf'和'hasItems',但是我不能很好地掌握語法。