mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +00:00
LibJS: Implement console.assert()
This commit is contained in:
parent
e37421bddc
commit
8d490aba76
12 changed files with 89 additions and 9 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2020, Linus Groh <mail@linusgroh.de>
|
||||
* Copyright (c) 2020-2021, Linus Groh <mail@linusgroh.de>
|
||||
* Copyright (c) 2020, Emanuele Torre <torreemanuele6@gmail.com>
|
||||
* All rights reserved.
|
||||
*
|
||||
|
@ -50,6 +50,7 @@ void ConsoleObject::initialize(GlobalObject& global_object)
|
|||
define_native_function(vm.names.count, count);
|
||||
define_native_function(vm.names.countReset, count_reset);
|
||||
define_native_function(vm.names.clear, clear);
|
||||
define_native_function(vm.names.assert, assert_);
|
||||
}
|
||||
|
||||
ConsoleObject::~ConsoleObject()
|
||||
|
@ -101,4 +102,9 @@ JS_DEFINE_NATIVE_FUNCTION(ConsoleObject::clear)
|
|||
return global_object.console().clear();
|
||||
}
|
||||
|
||||
JS_DEFINE_NATIVE_FUNCTION(ConsoleObject::assert_)
|
||||
{
|
||||
return global_object.console().assert_();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue