diff options
author | Iván Ávalos <avalos@disroot.org> | 2022-11-15 08:00:24 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2022-11-15 08:00:24 -0600 |
commit | a3097d32c66cbdff04de14481923c7464b0a8a29 (patch) | |
tree | 4833a3bfdf4b41df13baaa051337c29721782901 | |
parent | d6d133d55eaa32ed3457e00f6d9baa4e267dad38 (diff) | |
download | javanol-a3097d32c66cbdff04de14481923c7464b0a8a29.tar.gz javanol-a3097d32c66cbdff04de14481923c7464b0a8a29.tar.bz2 javanol-a3097d32c66cbdff04de14481923c7464b0a8a29.zip |
Se añaden casos de prueba
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | pruebas/lexer.es | 12 | ||||
-rw-r--r-- | pruebas/planteamiento.es | 16 | ||||
-rw-r--r-- | pruebas/sintaxis.es | 6 |
4 files changed, 35 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ba0430d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +__pycache__/
\ No newline at end of file diff --git a/pruebas/lexer.es b/pruebas/lexer.es new file mode 100644 index 0000000..6f1e0c1 --- /dev/null +++ b/pruebas/lexer.es @@ -0,0 +1,12 @@ +/* Stress test */ +"Hola, esto es una prueba" /* Esto es un comentario"" 'dfkj */ +'c' 'a' 'r' "Otro string" 'a' +- > <= === ++ !=-- || && = + +/* Pruebas normales */ +booleano _hello = verdadero; +entero esto23 = 123 * 10; +cadena cadena_txt = "/* ¡Hola, mundo! */"; + +si (_hello) { + imprimir cadena_txt; +}
\ No newline at end of file diff --git a/pruebas/planteamiento.es b/pruebas/planteamiento.es new file mode 100644 index 0000000..b378da8 --- /dev/null +++ b/pruebas/planteamiento.es @@ -0,0 +1,16 @@ +entero a = 10; +entero b = 20; +booleano c = verdadero; + +vacio imprimir_n (entero n, cadena s) { + entero i = 0; + porcada (i = 0; i < b; i++) { + imprimir s; + } +} + +si (a == b) { + imprimir "Son iguales"; +} sino { + imprimir_n (b, "Son diferentes"); +} diff --git a/pruebas/sintaxis.es b/pruebas/sintaxis.es new file mode 100644 index 0000000..ff141c7 --- /dev/null +++ b/pruebas/sintaxis.es @@ -0,0 +1,6 @@ +entero a = 10; +entero b = 20; +booleano c = verdadero; +caracter d; +imprimir a + b; +imprimir "Hola, Mundo";;
\ No newline at end of file |