ugBASIC 1.18
An isomorphic BASIC language compiler for retrocomputers
Loading...
Searching...
No Matches
tester.h
Go to the documentation of this file.
1#ifndef __UGBASICTESTER__
2#define __UGBASICTESTER__
3
4/*****************************************************************************
5 * ugBASIC - an isomorphic BASIC language compiler for retrocomputers *
6 *****************************************************************************
7 * Copyright 2021-2026 Marco Spedaletti (asimov@mclink.it)
8 *
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
12 *
13 * http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 *----------------------------------------------------------------------------
21 * Concesso in licenza secondo i termini della Licenza Apache, versione 2.0
22 * (la "Licenza"); è proibito usare questo file se non in conformità alla
23 * Licenza. Una copia della Licenza è disponibile all'indirizzo:
24 *
25 * http://www.apache.org/licenses/LICENSE-2.0
26 *
27 * Se non richiesto dalla legislazione vigente o concordato per iscritto,
28 * il software distribuito nei termini della Licenza è distribuito
29 * "COSÌ COM'È", SENZA GARANZIE O CONDIZIONI DI ALCUN TIPO, esplicite o
30 * implicite. Consultare la Licenza per il testo specifico che regola le
31 * autorizzazioni e le limitazioni previste dalla medesima.
32 ****************************************************************************/
33
34/****************************************************************************
35 * INCLUDE SECTION
36 ****************************************************************************/
37
38#include <stdio.h>
39#include <string.h>
40#include <stdlib.h>
41#include <limits.h>
42#include <unistd.h>
43
44#include "../src/ugbc.h"
45#include "../src/libs/msc1.h"
46
47/****************************************************************************
48 * DECLARATIONS AND DEFINITIONS SECTION
49 ****************************************************************************/
50
51// WORKERS
52
53void execute6502( Environment * _environment, char * _asm_filename, Variable * _variable );
54
55// TESTS
56
57void test_fp_conversion_to_bytes( Environment * _environment, double _value, int _expected[4] );
58void test_fp_conversion_to_double( Environment * _environment, int _value[4], double _expected );
59void test_fp_6502_add( Environment * _environment, double _first, double _second, double _expected );
60void test_fp_6502_sub( Environment * _environment, double _first, double _second, double _expected );
61
62// SUITES
63
64int suite_fp_6502( Environment * _environment );
65int suite_fp( Environment * _environment );
66
67#endif
void test_fp_6502_add(Environment *_environment, double _first, double _second, double _expected)
void test_fp_conversion_to_double(Environment *_environment, int _value[4], double _expected)
Definition test_fp.c:18
void execute6502(Environment *_environment, char *_asm_filename, Variable *_variable)
Definition worker_6502.c:3
int suite_fp(Environment *_environment)
Definition suite_fp.c:3
int suite_fp_6502(Environment *_environment)
void test_fp_conversion_to_bytes(Environment *_environment, double _value, int _expected[4])
Definition test_fp.c:3
void test_fp_6502_sub(Environment *_environment, double _first, double _second, double _expected)
struct _Variable Variable
Structure of a single variable.
struct _Environment Environment
Structure of compilation environment.