Commit graph

104 commits

Author SHA1 Message Date
Olivier Goffart
c91ea3f615 interpreter test: In case of failure of the test, dump all properties 2021-05-11 14:59:57 +02:00
Olivier Goffart
675528bfb9 Run the integration test also on windows
The code that extract the rust/cpp/js snippets from the testcases
did not work on windows because of the different newline character
2021-05-11 11:40:26 +02:00
Olivier Goffart
7f7f2245d8 Use the testing backend for node 2021-05-11 11:40:26 +02:00
Olivier Goffart
988c2b0b9d Use the testing backend for the C++ integration tests 2021-05-11 11:40:26 +02:00
Olivier Goffart
a0e910abf0 Use the testing backend for rust 2021-05-11 11:40:26 +02:00
Olivier Goffart
662c52abff Introduce a "testing" rendering backend and use it for the interpreter test
This way the tests can pass even if the tests would otherwise need a running
window, like they do with the GL backend
2021-05-11 11:40:26 +02:00
Olivier Goffart
feadcfa25a Update cbindgen 2021-04-23 16:18:52 +02:00
Olivier Goffart
862f65c151 Fix panic in the interpreter when accessing uninitialized global
As the type of the Value wouldn't match the expected type

Fixes #173

(Also added a way to test the interpreter by making the interpreter
make sure the property "test", if it exists, is true)
2021-04-19 11:41:36 +02:00
Olivier Goffart
e8e0bcb4d0 interpreter test: try to load the examples 2021-04-13 09:49:32 +02:00
Simon Hausmann
1cfbbb090a Fix standalone build of test-driver-interpreter
Calling `sixtyfps_interpreter::print_diagnostics` requires the diagnostics feature in the interpreter.
2021-04-08 16:13:53 +02:00
Olivier Goffart
9416b0a3d9 Upgrade version of cbindgen 2021-04-07 13:39:58 +02:00
Olivier Goffart
21da822123 Fix compilation of the C++ tests
Last commit added a dependency to proc-macro2 for cbindgen, but we also need
it in the C++ test driver
2021-04-07 13:31:29 +02:00
Simon Hausmann
4a9cd954b8 Rework the Rust entry point API for the interpreter
Switch to the stateful `ComponentCompiler` concept that we discussed for the C++ API.
2021-03-18 18:20:50 +01:00
Olivier Goffart
0e351de1a6 Create a new crate to expose the C++ 2021-03-16 16:34:02 +01:00
Simon Hausmann
79aefcb303 Fix compilation of tests 2021-03-15 20:02:31 +01:00
Olivier Goffart
fef4a10ebd Use the new API for the interpreter in wasm
Improve the ComponenetDefinition::from_source
2021-03-15 17:57:46 +01:00
Olivier Goffart
48333370a6 Use the new interpreter API in things that depends on it 2021-03-15 17:29:27 +01:00
Simon Hausmann
70ff7baa85 Fix compilation after diagnostics API changes 2021-03-15 10:43:26 +01:00
Olivier Goffart
096f55e365 Change behavior of percent sice within the layout
So that size with percentages don't affect the maximum/minimum size

Fixes #117
2021-02-11 20:32:26 +01:00
Olivier Goffart
49c7300907 Support for if else in statements 2021-02-05 13:53:37 +01:00
Olivier Goffart
4fd3eaf9d1 Add a SIXTYFPS_TEST_FILTER macro to be able to limit the tests we compile in
Quite usefull to quicly compile some tests for the rust backend which is slow to compile
2021-02-03 10:41:19 +01:00
Olivier Goffart
a143656dc9 Test driver: move some common code in the lib 2021-02-03 10:32:25 +01:00
Olivier Goffart
f2ab456a7b Test the .60 snippet in the documentation 2021-02-02 14:56:22 +01:00
Olivier Goffart
7613b9231f Rename the rust test driver in a consistant way 2021-02-01 18:45:14 +01:00
Olivier Goffart
50ce2d08fd Split the nodejs and the interpreter test driver 2021-02-01 18:43:48 +01:00
Olivier Goffart
c25f383308 WIP: split interpreter and nodejs 2021-02-01 18:37:24 +01:00
Olivier Goffart
6b20d05efb Move the C++ driver to its own crate 2021-02-01 18:34:49 +01:00
Olivier Goffart
09ce4142a5 Some reorganization of the testdriver 2021-02-01 18:13:19 +01:00
Olivier Goffart
efd6a5479c don't make xtask depends on the test driver lib 2021-02-01 18:13:08 +01:00
Olivier Goffart
c2dc0cef2c Finish return statement handling 2021-01-25 15:32:00 +01:00
Olivier Goffart
0d2d48be4f Rename "signal" to "callback" 2020-12-18 09:51:01 +01:00
Simon Hausmann
5f9f1ce047 Fix the build
Fix the remaining CompilerConfiguration uses that I missed :(
2020-12-10 16:13:17 +01:00
Olivier Goffart
7113187864 C++: Fix warnings 2020-11-19 13:50:15 +01:00
Olivier Goffart
359f42c5f7 Prepare the compiler to be async
This will allow the online editor to load imports from URL asynchroniously later

Since currently the compiler is only working on a single thread, and that we
never await on a future that could block, it is allowed to use the spin_on executor
2020-10-30 15:00:04 +01:00
Simon Hausmann
c188851b45 Fix nodejs tests on Windows
npm is in fact `npm.cmd` and Rust's std::process::Command doesn't look
for executables with .cmd extension. This is a common issue but also a deliberate choice
it appears (due to emulating CreateProcess).
2020-10-20 16:30:16 +02:00
Simon Hausmann
279ce560f9 Convert NodeJS API to use & export TypeScript
This will make the types available to API consumers and makes the
documentation clearer.
2020-10-20 15:57:50 +02:00
Simon Hausmann
309fa8aef1 Fix build 2020-10-14 15:34:38 +02:00
Olivier Goffart
1138c9dbed Normalize the spelling of SixtyFPS 2020-10-13 07:48:55 +02:00
Simon Hausmann
c16f2f2185 Clean up test cases
Instead of all files collected in a flat directory, restructure them
into categories and thus sub-directories.
2020-09-29 17:00:48 +02:00
Olivier Goffart
2275cd638a C++ Test: make sure to re-run cbindgen in case of changes
Also add -g to ease debugging
2020-09-15 12:18:36 +02:00
Olivier Goffart
67764f8250 Fix the build of the C++ testcases 2020-09-06 14:50:56 +02:00
Olivier Goffart
c80975c85c Use C++17 in the msvc tests 2020-09-06 00:07:53 +02:00
Olivier Goffart
5759e912d0 On windows, we must close the file otherwise the compiler won't be able to open it 2020-09-05 23:47:08 +02:00
Olivier Goffart
82bfcc388a Add some debug to find out why the test is failling to compile 2020-09-05 23:12:08 +02:00
Olivier Goffart
9c32de9fac Attempt to pass the right options to MSVC 2020-09-05 22:40:40 +02:00
Olivier Goffart
103e5659e4 More escaping for slashes in path 2020-09-05 19:56:56 +02:00
Olivier Goffart
3c46df46d9 Attempt to fix window build by properly escaping backslashes 2020-09-05 17:42:12 +02:00
Olivier Goffart
4f5e8c7aff Do not print the warnings from tests.
Warning as expected as even code with warning need to be tested.
If anything, we could ensure that warning were indeed expected
by testing against a `^warning` comment
2020-09-05 17:29:00 +02:00
Simon Hausmann
ff9c118e07 Propagate warnings to the end of the compilation step and print them 2020-09-04 20:34:20 +02:00
Simon Hausmann
628426aded Rename cpp.rs to cppdriver.rs
This makes completion better :-)
2020-09-03 12:58:52 +02:00