summaryrefslogtreecommitdiff
path: root/Tests
AgeCommit message (Collapse)Author
2021-07-17LibWeb: Hide implementation details of HTMLToken attribute listMax Wipfli
Previously, HTMLToken would expose the Vector<Attribute> directly to its users. In preparation for a future change, all users now use implementation-agnostic APIs which do not expose the Vector directly.
2021-07-17LibWasm+Everywhere: Make the instruction count limit configurableAli Mohammad Pur
...and enable it for LibWeb and test-wasm. Note that `wasm` will not be limited by this.
2021-07-17Revert "LibWasm: Some more performance stuff (#8812)"Ali Mohammad Pur
This reverts commit 35394dbfaa23b44a293da85b20a63a10f73572c3. I pushed the wrong button again, hopefully this will be the last of such incidents.
2021-07-17LibWasm: Some more performance stuff (#8812)Ali Mohammad Pur
* wasm: Don't try to print the function results if it traps * LibWasm: Inline some very hot functions These are mostly pretty small functions too, and they were about ~10% of runtime. * LibWasm+Everywhere: Make the instruction count limit configurable ...and enable it for LibWeb and test-wasm. Note that `wasm` will not be limited by this. * LibWasm: Remove a useless use of ScopeGuard There are no multiple exit paths in that function, so we can just put the ending logic right at the end of the function instead.
2021-07-16AK/Tests: Add test for EnumBits has_any_flag()Timothy
This test will pass when any flag in the mask is present in the value.
2021-07-16AK/Tests: Add test for EnumBits has_flag()Timothy
This test requires that all values in the mask are present in the value as well.
2021-07-15AK: Make JsonParser correctly parse unsigned values larger than u32Ali Mohammad Pur
Prior to this, it'd try to stuff them into an i64, which could fail and give us nothing. Even though this is an extension we've made to JSON, the parser should be able to correctly round-trip from whatever our serialiser has generated.
2021-07-15LibWeb: Fix assertion failure when tokenizing JS regex literalsMax Wipfli
This fixes parsing the following regular expression: /</g; It also adds a simple script element to the HTMLTokenizer regression test, which also contains that specific regex.
2021-07-15Tests: Add comments to the HTMLTokenizer regression test fileMax Wipfli
2021-07-14Tests: Add a basic test suite for HTMLTokenizerMax Wipfli
The test suite includes a few basic tests and a very crude regression test, which just concatenates the to_string() of all tokens and checks the String's hash to be equal. This relies on the format of HTMLToken::to_string() to stay the same, which is not ideal.
2021-07-14Tests: Fix compile errors on ClangDaniel Bertalan
Since Clang enables a couple of warnings that we don't have in GCC, these were not caught before. Included fixes: - Use correct printf format string for `size_t` - Don't compare Nonnull(Ref|Own)Ptr` to nullptr - Fix unsigned int& => unsigned long& conversion
2021-07-14Tests: Rename write-oobHendiadyoin1
The "ue-" prefix makes it clearer that it should be run with the UserspaceEmulator
2021-07-14Tests: Assure that UE does not regress via `ue ls`Hendiadyoin1
2021-07-11Userland+Tests: Convert test_io to be LibTest basedAndrew Kaster
Add a few extra tests as well, to make sure we don't have any future TmpFs regressions.
2021-07-11Utilities+Tests: Convert test_efault to be LibTest basedAndrew Kaster
This test exposed a kernel panic in is_user_range calculations, so let's convert it to be a LibTest test so we can prevent regressions in mmap, the page allocator, and the memory manager.
2021-07-11AK: Bring back FixedArray<T>Andreas Kling
Let's bring this class back, but without the confusing resize() API. A FixedArray<T> is simply a fixed-size array of T. The size is provided at run-time, unlike Array<T> where the size is provided at compile-time.
2021-07-10LibRegex: Correctly parse BRE bracket expressionsAli Mohammad Pur
Commonly, bracket expressions are in fact, enclosed in brackets.
2021-07-10LibRegex: Add support for non-extended regular expressions in regcomp()Ali Mohammad Pur
Fixes part of #8506.
2021-07-08LibSQL+SQLServer: Build SQLServer system serviceJan de Visser
This patch introduces the SQLServer system server. This service is supposed to be the only process/application talking to database storage. This makes things like locking and caching more reliable, easier to implement, and more efficient. In LibSQL we added a client component that does the ugly IPC nitty- gritty for you. All that's needed is setting a number of event handler lambdas and you can connect to databases and execute statements on them. Applications that wish to use this SQLClient class obviously need to link LibSQL and LibIPC.
2021-07-08LibSQL: Move Order and Nulls enums from SQL::AST to SQL namespaceJan de Visser
The Order enum is used in the Meta component of LibSQL. Using this enum meant having to include the monster AST/AST.h include file. Furthermore, they are sort of basic and therefore can live in the general SQL namespace. Moved to LibSQL/Type.h. Also introduced a new class, SQLResult, which is needed in future patches.
2021-07-07Tests: Build all tests on x86_64Gunnar Beutner
This builds some previously-disabled tests for x86_64.
2021-07-06LibRegex: Allow dollar signs in ECMA262 named capture groupsTimothy Flynn
Fixes 1 test262 test.
2021-07-06Tests+Base: Convert stack-smash to be LibTest based and stop skipping itAndrew Kaster
Now that the test is converted to be LibTest based, we can remove it from the exclude list in /home/anon/.config/Tests.ini. Prior to this it would crash and fail because it was signaled instead of returning normally with exit code 0.
2021-07-06Tests: Set a default font in BenchmarkGfxPainter to prevent crashesAndrew Kaster
After the changes to LibGfx to make default font management handled in WindowServer instead of each GUI application to allow for global font broadcasts, the two LibGfx tests broke. The non-benchmark was fixed in 8f96d2, but the benchmark was left in the dust because nobody really runs it manually :^(
2021-07-06LibJS: Remove the default length & attributes from define_native_*Idan Horowitz
These are usually incorrect, and people sometimes forget to add the correct values as a result of them being optional, so they should just be specified explicitly.
2021-07-05JsonParser: Bring parser more to specstelar7
2021-07-04LibWeb/WebAssembly+test-wasm: Use get_without_side_effects() moreLinus Groh
2021-07-04Tests: Add test for String::roman_number_from()Tobias Christiansen
2021-07-04Everywhere: Prefer using "..."sv over StringView { "..." }Gunnar Beutner
2021-07-04Tests: Add tests for `Optional`'s conditionally trivial functionsDaniel Bertalan
2021-07-04AK: Destroy original value when assigning to VariantDaniel Bertalan
2021-07-04Tests: Add test for supported operation type traitsDaniel Bertalan
2021-07-02Tests: Add test for String::find with empty needleMax Wipfli
This adds a test case for String::find and String::find_all with empty needles. The expected behavior is in line with what the C++ standard library (and other languages standard libraries) expect.
2021-07-02AK: Implement String::find_any_of() and StringView::find_any_of()Max Wipfli
This implements StringUtils::find_any_of() and uses it in String::find_any_of() and StringView::find_any_of(). All uses of find_{first,last}_of have been replaced with find_any_of(), find() or find_last(). find_{first,last}_of have subsequently been removed.
2021-07-02AK+Everywhere: Remove StringView::find_{first,last}_of(char) methodsMax Wipfli
This removes StringView::find_first_of(char) and find_last_of(char) and replaces all its usages with find and find_last respectively. This is because those two methods are functionally equivalent. find_{first,last}_of should only be used if searching for multiple different characters, which is never the case with the char argument. This also adds the [[nodiscard]] to the remaining find_{first,last}_of methods.
2021-07-02Tests+LibThreading: Add new tests for LibThreading for detach()Spencer Dixon
2021-07-02LibWasm: Give traps a reason and display it when neededAli Mohammad Pur
This makes debugging wasm code a bit easier, as we now know what fails instead of just "too bad, something went wrong".
2021-07-01LibCrypto: Add tests for SignedBigInteger bitwise operationsGal Horowitz
2021-06-30AK+Everywhere: Remove "null state" of LexicalPathMax Wipfli
This removes the default constructor of LexicalPath, and subsequently modifies all its users to accommodate the change.
2021-06-30AK: Make LexicalPath immutableMax Wipfli
This replaces the current LexicalPath::append() API with a new method that returns a new LexicalPath object and doesn't touch the this-object. With this, LexicalPath is now immutable. It also adds a LexicalPath::parent() method and the relevant test cases.
2021-06-30Tests: Rewrite tests for LexicalPathMax Wipfli
2021-06-30AK: Remove the LexicalPath::is_valid() APIMax Wipfli
Since this is always set to true on the non-default constructor and subsequently never modified, it is somewhat pointless. Furthermore, there are arguably no invalid relative paths.
2021-06-30Userland+Tests: Split out generic test runner from JS TestRunnerAndrew Kaster
Split out the functionality to gather multiple tests from the filesystem and run them in turn into Test::TestRunner, and leave the JavaScript specific test harness logic in Test::JS::TestRunner and friends.
2021-06-30Tests: TestProcFs cannot assume stdin/stdout/stderr are the sameAndrew Kaster
If someone runs the test with shell redirection going on, or in a way that changes any of the standard file descriptors this assumption will not hold. When running from a terminal normally, it is true however. Instead, check that /proc/self/fd/[0,1,2] are symlinks, and can be stat-d by verifying that both stat and lstat succeed, and give different struct stat contents.
2021-06-29LibCrypto: Replace from_base{2,8,10,16}() & to_base10 with from_base(N)Idan Horowitz
This allows us to support parsing and serializing BigIntegers to and from any base N (such that 2 <= N <= 36).
2021-06-28AK: Add and use the RemoveCVReference<T> type traitAli Mohammad Pur
2021-06-27LibJS: Rename Function => FunctionObjectAndreas Kling
2021-06-27AK: Make the constexpr StringView methods actually constexprAli Mohammad Pur
Also add some tests to ensure that they _remain_ constexpr. In general, any runtime assertions, weirdo C casts, pointer aliasing, and such shenanigans should be gated behind the (helpfully newly added) AK::is_constant_evaluated() function when the intention is to write constexpr-capable code. a.k.a. deliver promises of constexpr-ness :P
2021-06-26AK: Undo bogus Variant::downcast() renameAndreas Kling
I accidentally renamed these to verify_cast() when doing the global AK::downcast() rename.
2021-06-24AK: Rename downcast<T> => verify_cast<T>Andreas Kling
This makes it much clearer what this cast actually does: it will VERIFY that the thing we're casting is a T (using is<T>()).