Turning on unit tests build and run during precommit.
This commit is contained in:
+1
-2
@@ -16,13 +16,12 @@
|
||||
#ifndef COMMON_H
|
||||
#define COMMON_H
|
||||
|
||||
#include "jerry-libc.h"
|
||||
#include "literal.h"
|
||||
|
||||
#define NAME_TO_ID(op) (__op__idx_##op)
|
||||
|
||||
#define __OPCODE_SIZE(name, arg1, arg2, arg3) \
|
||||
sizeof (__op_##name) + 1,
|
||||
(uint8_t) (sizeof (__op_##name) + 1),
|
||||
|
||||
#define LP(s) create_literal_from_str_compute_len (s)
|
||||
#define NUM(s) create_literal_from_num (s)
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "ecma-globals.h"
|
||||
#include "ecma-helpers.h"
|
||||
#include "jrt.h"
|
||||
#include "jerry-libc.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
/**
|
||||
* Unit test's main function.
|
||||
@@ -44,17 +44,17 @@ main( int __attr_unused___ argc,
|
||||
|
||||
const ecma_number_t nums[] =
|
||||
{
|
||||
1.0,
|
||||
0.5,
|
||||
12345.0,
|
||||
12345.123,
|
||||
1.0e-45,
|
||||
-2.5e+38,
|
||||
NAN,
|
||||
INFINITY,
|
||||
-INFINITY,
|
||||
+0.0,
|
||||
-0.0
|
||||
(ecma_number_t) 1.0,
|
||||
(ecma_number_t) 0.5,
|
||||
(ecma_number_t) 12345.0,
|
||||
(ecma_number_t) 12345.123,
|
||||
(ecma_number_t) 1.0e-45,
|
||||
(ecma_number_t) -2.5e+38,
|
||||
(ecma_number_t) NAN,
|
||||
(ecma_number_t) INFINITY,
|
||||
(ecma_number_t) -INFINITY,
|
||||
(ecma_number_t) +0.0,
|
||||
(ecma_number_t) -0.0
|
||||
};
|
||||
|
||||
for (uint32_t i = 0;
|
||||
|
||||
@@ -17,21 +17,18 @@
|
||||
* Unit test for pool manager.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#define JERRY_MEM_POOL_INTERNAL
|
||||
|
||||
#include "jrt.h"
|
||||
#include "jerry-libc.h"
|
||||
#include "mem-allocator.h"
|
||||
#include "mem-pool.h"
|
||||
#include "mem-poolman.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
extern void srand (unsigned int __seed);
|
||||
extern int rand (void);
|
||||
extern long int time (long int *__timer);
|
||||
}
|
||||
|
||||
// Iterations count
|
||||
const uint32_t test_iters = 16384;
|
||||
|
||||
|
||||
@@ -13,13 +13,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "jrt.h"
|
||||
#include "mem-allocator.h"
|
||||
#include "opcodes.h"
|
||||
#include "deserializer.h"
|
||||
#include "common.h"
|
||||
#include "parser.h"
|
||||
#include "jerry-libc.h"
|
||||
|
||||
/**
|
||||
* Unit test's main function.
|
||||
|
||||
@@ -13,12 +13,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include "ecma-globals.h"
|
||||
#include "ecma-helpers.h"
|
||||
#include "jrt.h"
|
||||
#include "jerry-libc.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
/**
|
||||
* Unit test's main function.
|
||||
@@ -51,24 +50,24 @@ main( int __attr_unused___ argc,
|
||||
|
||||
const ecma_number_t nums[] =
|
||||
{
|
||||
1.0,
|
||||
0.5,
|
||||
12345.0,
|
||||
1.0e-45,
|
||||
-2.5e+38,
|
||||
-2.5e+38,
|
||||
NAN,
|
||||
NAN,
|
||||
NAN,
|
||||
NAN,
|
||||
NAN,
|
||||
NAN,
|
||||
NAN,
|
||||
NAN,
|
||||
INFINITY,
|
||||
-INFINITY,
|
||||
+0.0,
|
||||
-0.0
|
||||
(ecma_number_t) 1.0,
|
||||
(ecma_number_t) 0.5,
|
||||
(ecma_number_t) 12345.0,
|
||||
(ecma_number_t) 1.0e-45,
|
||||
(ecma_number_t) -2.5e+38,
|
||||
(ecma_number_t) -2.5e+38,
|
||||
(ecma_number_t) NAN,
|
||||
(ecma_number_t) NAN,
|
||||
(ecma_number_t) NAN,
|
||||
(ecma_number_t) NAN,
|
||||
(ecma_number_t) NAN,
|
||||
(ecma_number_t) NAN,
|
||||
(ecma_number_t) NAN,
|
||||
(ecma_number_t) NAN,
|
||||
(ecma_number_t) INFINITY,
|
||||
(ecma_number_t) -INFINITY,
|
||||
(ecma_number_t) +0.0,
|
||||
(ecma_number_t) -0.0
|
||||
};
|
||||
|
||||
for (uint32_t i = 0;
|
||||
|
||||
Reference in New Issue
Block a user