summaryrefslogtreecommitdiff
path: root/Tests
AgeCommit message (Collapse)Author
2021-07-30LibRegex+LibUnicode: Begin implementing Unicode property escapesTimothy Flynn
This supports some binary property matching. It does not support any properties not yet parsed by LibUnicode, nor does it support value matching (such as Script_Extensions=Latin).
2021-07-30Kernel: Unmapping a non-mapped region with munmap() should be a no-opAndreas Kling
Not a regression per se from 0fcb9efd86da4c15a1aee87503348c5bee875c51 since we were crashing before that which is obviously worse.
2021-07-30Tests: Validate unmapping 0x0 doesn't crash the KernelBrian Gianforcaro
Previously unmapping any offset starting at 0x0 would assert in the kernel, add a regression test to validate the fix. Co-authored-by: Federico Guerinoni <guerinoni.federico@gmail.com>
2021-07-28LibUnicode: Handle code points that are both cased and case-ignorableTimothy Flynn
Apparently, some code points fit both categories, for example U+0345 (COMBINING GREEK YPOGEGRAMMENI). Handle this fact when determining if a code point is a final code point in a string.
2021-07-28LibUnicode: Check word break when deciding on case-ignorable code pointsTimothy Flynn
2021-07-28LibUnicode: Check property list when deciding if a code point is casedTimothy Flynn
2021-07-28LibWeb: Avoid assertion failure on parsing numeric character referencesovf
2021-07-27LibUnicode: Begin implementing special Unicode case foldingTimothy Flynn
This implements unconditional special case folding, and conditional folding for non-locale cases. Worth noting that the only conditional, non-locale special case is for converting an uppercase sigma to lowercase.
2021-07-27LibWeb: Fix parsing of character references in attribute valuesovf
2021-07-26LibUnicode: Introduce a Unicode library for interacting with UCD filesTimothy Flynn
The Unicode standard publishes the Unicode Character Database (UCD) with information about every code point, such as each code point's upper case mapping. LibUnicode exists to download and parse UCD files at build time and to provide accessors to that data. As a start, LibUnicode includes upper- and lower-case code point converters.
2021-07-25AK: Create MACAddress from stringbrapru
Previously there was no way to create a MACAddress by passing a direct address as a string. This will allow programs like the arp utility to create a MACAddress instance by user-passed addresses.
2021-07-24Tests: Add tests for the quoted printable decoderLuke
2021-07-23LibRegex: Support ECMA-262 Unicode escapes of the form "\u{code_point}"Timothy Flynn
When the Unicode flag is set, regular expressions may escape code points by surrounding the hexadecimal code point with curly braces, e.g. \u{41} is the character "A". When the Unicode flag is not set, this should be considered a repetition symbol - \u{41} is the character "u" repeated 41 times. This is left as a TODO for now.
2021-07-23LibRegex: Support UTF-16 RegexStringView and improve Unicode matchingTimothy Flynn
When the Unicode option is not set, regular expressions should match based on code units; when it is set, they should match based on code points. To do so, the regex parser must combine surrogate pairs when the Unicode option is set. Further, RegexStringView needs to know if the flag is set in order to return code point vs. code unit based string lengths and substrings.
2021-07-23Tests: Add test coverage for sys$pledge(..) argument validationBrian Gianforcaro
2021-07-23Tests: Add test coverage for sys$unveil(..) argument validationBrian Gianforcaro
2021-07-22AK: Implement {any,all}_of(IterableContainer&&, Predicate)Ali Mohammad Pur
This is a generally nicer-to-use version of the existing {any,all}_of() that doesn't require the user to explicitly provide two iterators. As a bonus, it also allows arbitrary iterators (as opposed to the hard requirement of providing SimpleIterators in the iterator version).
2021-07-22AK: Add a CommonType<Ts...> type traitAli Mohammad Pur
Also adds a simple-ish test for CommonType.
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.