deprecation extension: clean-up tests.

This commit is contained in:
Tobie Langel 2009-03-23 16:30:28 +01:00
parent 827e6ee1ae
commit f44d0500d9
1 changed files with 14 additions and 10 deletions

View File

@ -45,8 +45,8 @@
var actualType = log.type.beforeLast() || log.type.last();
this.assertEqual(expected, actualMessage, 'assertInfoNotified');
this.assertEqual('info', actualType, 'assertInfoNotified');
log.message.push(null);
log.type.push(null);
log.message.length = 0;
log.type.length = 0;
},
assertErrorNotified: function(expected) {
@ -54,8 +54,8 @@
var actualType = log.type.beforeLast() || log.type.last();
this.assertEqual(expected, actualMessage, 'assertErrorNotified');
this.assertEqual('error', actualType, 'assertErrorNotified');
log.message.push(null);
log.type.push(null);
log.message.length = 0;
log.type.length = 0;
},
assertWarnNotified: function(expected) {
@ -63,15 +63,19 @@
var actualType = log.type.beforeLast() || log.type.last();
this.assertEqual(expected, actualMessage, 'assertWarnNotified');
this.assertEqual('warn', actualType, 'assertWarnNotified');
log.message.push(null);
log.type.push(null);
log.message.length = 0;
log.type.length = 0;
},
assertNotNotified: function() {
this.assertNull(log.message.last(), 'assertNotNotified');
this.assertNull(log.type.last());
log.message.push(null);
log.type.push(null);
this.assertEmpty(log.message, 'assertNotNotified');
this.assertEmpty(log.type, 'assertNotNotified');
log.message.length = 0;
log.type.length = 0;
},
assertEmpty: function(array, message) {
this.assertEqual(0, array.length, message || '');
}
});