summaryrefslogtreecommitdiff
path: root/Tests
AgeCommit message (Collapse)Author
2021-07-22AK: Add Utf16View for decoding UTF-16 stringsTimothy Flynn
Also includes a way to transcode from and to UTF-8 strings.
2021-07-21LibGfx: Use "try_" prefix for static factory functionsAndreas Kling
Also mark them as [[nodiscard]].
2021-07-19AK: Use new Formatter for each element in Formatter<Vector<T>>Andrew Kaster
The state of the formatter for the previous element should be thrown away for each iteration. This showed up when trying to format a Vector<String>, since Formatter<StringView> was unhappy about some state that gets set when it's called. Add a test for Formatter<Vector>.
2021-07-18Tests: Make mmap test point to new kernel address tooPeter Bindels
During a recent commit the 64-bit kernel was moved to a different address, breaking this test (unnoticed). This fixes it, so we can turn on breaking x86_64 tests on the CI again.
2021-07-18LibRegex+Everywhere: Make LibRegex more unicode-awareAli Mohammad Pur
This commit makes LibRegex (mostly) capable of operating on any of the three main string views: - StringView for raw strings - Utf8View for utf-8 encoded strings - Utf32View for raw unicode strings As a result, regexps with unicode strings should be able to properly handle utf-8 and not stop in the middle of a code point. A future commit will update LibJS to use the correct type of string depending on the flags.
2021-07-18LibRegex: Don't do out-of-bound match accesses when a test failsAli Mohammad Pur
2021-07-18Tests: Disable test if platform has no UserspaceEmulatorPeter Bindels
Disable test for component with same check that component itself has.
2021-07-18AK: Allow setting both width and precision when formatting a stringTimothy Flynn
2021-07-17AK: Track byte length, rather than code point length, in Utf8View::trimTimothy Flynn
Utf8View::trim uses Utf8View::substring_view to return its result, which requires the input to be a byte offset/length rather than code point length.
2021-07-17LibM: Turn off builtins, fix tests & implementationPeter Bindels
While trying to port to Clang we found that the functions as implemented didn't actually work, and replacing them with a blatantly broken function also did not break the tests on the GCC build. It turns out we've been testing GCC's builtins by many tests. This removes the use of builtins for LibM's tests (so we test the whole function). It turns off the denormal test for scalbn (which was not implemented) and comments out the tgamma(0.5) test which is too inaccurate to be usable (and too complicated for me to fix). The gamma function was made accurate for all other test cases, and asin received two more layers of Taylor expansion to bring it within error margin for the tests.
2021-07-17Tests: Use pointers in TestHTMLTokenizer to avoid copying HTMLTokensMax Wipfli
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.