Irmen de Jong
f21dcaa6fb
split out the code optimizers into own project submodule
2021-10-29 02:42:10 +02:00
Irmen de Jong
2c940de598
better name
2021-10-29 01:06:01 +02:00
Irmen de Jong
ce75b776bb
refactor loadAsmIncludeFile response
2021-10-29 01:01:24 +02:00
Irmen de Jong
ac5f45d2d4
fix nested label lookups in anon scopes (partly)
2021-10-27 02:41:24 +02:00
Irmen de Jong
9684f4e42a
add unit tests for AnonScope refactoring, cleaned up imports
2021-10-27 00:05:46 +02:00
Irmen de Jong
35e88dd529
(7.2) correctly parse datatype of array parameters
2021-10-21 22:06:21 +02:00
Irmen de Jong
dd5abae721
move testcase to proper location
2021-10-20 23:08:40 +02:00
Irmen de Jong
82d3d81bb2
don't want to complicate things by introducing a boolean literal
2021-10-19 23:58:50 +02:00
Irmen de Jong
7f15b7b716
remove unneeded check for duplicate module names as this is now caught by the logic in Program.addModule itself
2021-10-19 22:12:54 +02:00
Irmen de Jong
e5b9e1f5e7
string object identity hashcode can be negative sometimes, so allow a '-' character.
2021-10-19 21:08:15 +02:00
Irmen de Jong
4011dce31b
added a few more tests for the file element of Position
2021-10-19 00:26:02 +02:00
Irmen de Jong
cf0e395921
got rid of SourceCode.pathString() and the 'need' to strip < and >
2021-10-16 17:15:22 +02:00
Irmen de Jong
aea364e43d
paths are now always relative to the current directory. Fixes #64
2021-10-16 14:26:33 +02:00
Irmen de Jong
16ed68c1ec
Module.name is now derived back from the source's origin string
2021-10-14 23:58:14 +02:00
Irmen de Jong
0447b3e4cc
remove testcase that attempted to check invalid %import syntax.
...
we only allow unquoted names, without filename suffix, in %import.
2021-10-13 22:10:35 +02:00
Irmen de Jong
d790878af6
enabled test
2021-10-13 20:28:42 +02:00
Irmen de Jong
6070afa6b6
cleanup SourceCode class
2021-10-13 19:16:01 +02:00
Irmen de Jong
e5a1b37981
simplify
2021-10-12 01:22:17 +02:00
Irmen de Jong
30aa72dc8e
fix unittest and use kotlin.test method to test for exceptions
2021-10-11 21:22:06 +02:00
Irmen de Jong
c55ac0450f
unified @embedded@ and library: into the latter
2021-10-11 19:22:56 +02:00
Irmen de Jong
f38fe092ee
optimized imports
2021-10-11 00:22:04 +02:00
Irmen de Jong
dbe98f3fa5
remove unittest of %target directive, which is removed in 7.1
2021-10-09 18:43:18 +02:00
meisl
bd6c60cf8a
* improve test method names in helpers_pathsTests by means of backtick syntax
2021-08-02 15:47:42 +02:00
meisl
f0c150d93b
* improve test method names in TestProg8Parser by means of backtick syntax
2021-08-02 15:36:08 +02:00
meisl
c2986eaf47
* structure TestProg8Parser with @Nested
2021-08-02 14:52:46 +02:00
meisl
ac02a99934
* move ModuleImporter to prog8.compiler (package & module), together with its tests
2021-08-02 10:07:19 +02:00
meisl
eb46852bb9
* restrict access to Program.modules, add tests
2021-08-02 08:15:20 +02:00
meisl
007d8d2811
* ModuleImporter tests: refactor, more precise assertions about the program's modules
2021-08-01 17:27:41 +02:00
meisl
ebe04fc114
* @Disable ModuleImporter test re importing a faulty module twice - no easy fix for this atm
2021-08-01 16:26:27 +02:00
meisl
b8fade23de
* (first quick) fix: ModuleImporter should look in given "libdirs" (or better "srcdirs"?) for module file
2021-08-01 15:17:47 +02:00
meisl
0d06e3ff22
*/+ refactor tests of ModuleImporter, add some tests related to libdirs issue
2021-08-01 10:48:28 +02:00
meisl
c914f7bbcf
+ TestCompilerOptionLibdirs.kt: libdirs option doesn't seem to work
2021-08-01 10:16:37 +02:00
meisl
1b451180c1
* test helpers assumeXyz (helpers/paths.kt) return the resulting path (unless they fail, of course); test directories are checked automatically at init, so no sanityCheckDirectories is needed anymore
2021-07-31 14:44:02 +02:00
meisl
e1026584c8
* split up test helpers into separate files, move mapCombinations(..) down to compilerAst/test/helpers since they're generic and don't depend on compiler
2021-07-30 18:37:12 +02:00
meisl
4c615e4fac
* solve problem re shared test helpers: a) don't use the same file name (results in same JVM class name) & b) tell gradle about it (put them in extra dir(s) test/helpers/ and add this to test source set)
2021-07-30 17:19:44 +02:00
meisl
db76c8d7f4
-/* remove IStringEncoding as param in compilerAst, and all other uses that were only because of that.
...
For good measure we also turn on *all* compiler tests with examples (they do take some time).
Note that the total *mentions* of IStringEncoding in the entire project went down from ~50 to 6, only 3 of which are *actual uses* (the others are 2 imports and 1 supertype ref in ICompilationTarget : IStringEncoding)!
2021-07-17 22:08:17 +02:00
meisl
34ba07ee3b
+ expose #55 : float[] initializer as range where no array size is stated
2021-07-17 16:30:16 +02:00
meisl
0567168ea9
+ add AST node CharLiteral, *without* turning them into ubyte s. This breaks tests, particularly 3 in TestCompilerOnCharLit. I'm comitting this separately since the failure modes might be of interest (compiler says "internal error").
2021-07-11 21:32:18 +02:00
meisl
c80a15846d
* some more housekeeping re tests: gradle doesn't like .* imports for annotations, added @Disabled comments, made warnings go away
2021-07-11 19:04:53 +02:00
meisl
5e194536a8
* refactor compiler tests, again prog8test.helpers (TODO: remove duplication)
2021-07-11 18:18:27 +02:00
meisl
43c5ab8ecc
* refactor compilerAst tests, intro prog8test.helpers, @Disable the 3 tests that will pass after subsequent steps of "the plan"
2021-07-11 17:32:29 +02:00
meisl
0d73a7cd07
+ add TestAstToSourceCode.kt (all 8 new tests failing due to missing semicolon)
2021-07-11 14:11:32 +02:00
meisl
6fa50a699f
+ add two tests for parseModule with empty source text (from File and from String)
2021-07-10 21:03:40 +02:00
meisl
ddaef3e5d5
+ add tests for SourceCode.fromResources; refactor tests
2021-07-10 20:55:23 +02:00
meisl
7530fb67c8
+ add tests for inner nodes' positions; refactor tests
2021-07-10 10:10:41 +02:00
meisl
137a89da15
* fix (hack) .name, .source and .position of Modules from the parser (via temp. subclass ParsedModule)
...
The temporary subclass ParsedModule : Module is introduced to concentrate all the workaround stuff in one place *while still not changing any public signature* such as of the Module ctor.
The convention used to indicate stuff from resources is still "<res:...>" not "@embedded@"- *note that this is caught by 3 tests in compiler*
2021-07-09 15:52:03 +02:00
meisl
af209ad50e
+ intro SourceCode, tying together source code text with its *origin*; Prog8Parser now only accepts this
2021-07-09 13:24:05 +02:00
meisl
cd4ed8765b
+ add tests for importModule(Path) with invalid path (non-existent or directory) - *failing*
2021-07-09 13:10:42 +02:00
meisl
b071a58ca7
+ add tests - 4 failing in TestModuleImporter
2021-07-09 12:51:07 +02:00
meisl
ce554f7718
* rename test file
2021-07-09 12:49:55 +02:00