Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F3051792
assert.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
855 B
Referenced Files
None
Subscribers
None
assert.h
View Options
#ifndef ANT_ASSERT_MODULE_H
#define ANT_ASSERT_MODULE_H
#include
"internal.h"
#include
"silver/engine.h"
ant_value_t
assert_library
(
ant_t
*
js
);
static
inline
bool
promise_was_rejected
(
ant_value_t
result
)
{
if
(
vtype
(
result
)
!=
T_PROMISE
)
return
false
;
ant_object_t
*
obj
=
js_obj_ptr
(
js_as_obj
(
result
));
return
obj
&&
obj
->
promise_state
&&
obj
->
promise_state
->
state
==
2
;
}
static
inline
void
promise_mark_handled
(
ant_value_t
v
)
{
if
(
vtype
(
v
)
!=
T_PROMISE
)
return
;
ant_object_t
*
obj
=
js_obj_ptr
(
js_as_obj
(
v
));
if
(
obj
&&
obj
->
promise_state
)
obj
->
promise_state
->
has_rejection_handler
=
true
;
}
static
inline
bool
promise_was_fulfilled
(
ant_value_t
result
)
{
if
(
vtype
(
result
)
!=
T_PROMISE
)
return
false
;
ant_object_t
*
obj
=
js_obj_ptr
(
js_as_obj
(
result
));
return
obj
&&
obj
->
promise_state
&&
obj
->
promise_state
->
state
==
1
;
}
#endif
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Fri, Apr 3, 3:17 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
521546
Default Alt Text
assert.h (855 B)
Attached To
Mode
rANT Ant
Attached
Detach File
Event Timeline
Log In to Comment