summaryrefslogtreecommitdiff
path: root/Tests
AgeCommit message (Collapse)Author
2022-03-09AK: Add reverse iterator as memberFederico Guerinoni
2022-03-09AK: Implement wrapper for reverse range for loopFederico Guerinoni
Now it is possible to use range for loop in reverse mode for a container. ``` for (auto item : in_reverse(vector)) ```
2022-03-09AK: Implement reverse iterator for Vector classFederico Guerinoni
2022-03-09LibCrypto: Add curve X448stelar7
2022-03-08LibC: Set `saved_str` to null in strtok_r if no tokens were foundDaniel Bertalan
If we do not do this, the next call to strtok_r will start tokenizing (and possibly modifying!) the memory pointed to by `saved_ptr`.
2022-03-08AK: Add IPv6Address classTom
This is the IPv6 counter part to the IPv4Address class and implements parsing strings into a in6_addr and formatting one as a string. It supports the address compression scheme as well as IPv4 mapped addresses.
2022-03-08Tests: Include limits.h for PATH_MAX in realpath testsTim Schumacher
2022-03-08Tests: Include limits.h for MB_LEN_MAX in wchar testsTim Schumacher
2022-03-08LibWeb: Move Window from DOM directory & namespace to HTMLLinus Groh
The Window object is part of the HTML spec. :^) https://html.spec.whatwg.org/multipage/window-object.html
2022-03-07LibPDF: Propagate errors in Parser and DocumentMatthew Olsson
2022-03-07AK: Add test for unbounded HashTable capacity leakAndreas Kling
2022-03-04Kernel: Add support for SA_SIGINFOAli Mohammad Pur
We currently don't really populate most of the fields, but that can wait :^)
2022-03-02AK: Print NaN and infinite numbers in PrintfImplementationPeter Ross
2022-03-02LibC: Set PRI[xX]8/PRI[xX]16 macros to `x` and `X`Peter Ross
Described in: <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/ inttypes.h.html> The macros were first added in a7a456002e91d9f13793e23aab4c24519c4e87c7, but it is not clear why the PRIx16/32 macros were defined as 'b' & 'w'. PrintfImplementation was never able to parse these values.
2022-02-28AK: Add tests for integer values formatting in printfTimur Sultanov
2022-02-28AK: Add FixedPoint base 2 logarithmkleines Filmröllchen
The log base 2 is implemented using the binary logarithm algorithm by Clay Turner (see the link in the comment)
2022-02-28AK: Fix FixedPoint to integral comparisonskleines Filmröllchen
Add tests to ensure that the fixed point numbers compare correctly to integrals
2022-02-27Tests: Test DisjointChunks with FixedArraykleines Filmröllchen
2022-02-25AK: Ignore whitespace while decoding base64Andreas Kling
This matches how other implementations behave. 1% progression on ACID3. :^)
2022-02-23LibTest+Spreadsheet: Add some basic spreadsheet runtime behaviour testsAli Mohammad Pur
As there's a somewhat active development going on, let's keep the expected behaviour under tests to make sure nothing blows up :^)
2022-02-21LibWeb: Make document.write() work while document is parsingAndreas Kling
This necessitated making HTMLParser ref-counted, and having it register itself with Document when created. That makes it possible for scripts to add new input at the current parser insertion point. There is now a reference cycle between Document and HTMLParser. This cycle is explicitly broken by calling Document::detach_parser() at the end of HTMLParser::run(). This is a huge progression on ACID3, from 31% to 49%! :^)
2022-02-21LibWeb: Fix 'Comment end state' in HTML TokenizerAdam Hodgen
Also, update the expected hash in the LibWeb TestHTMLTokenizer regression test. This is due to the "This comment has a few too many dashes." comment token being updated.
2022-02-20LibRegex: Make codegen+optimisation for alternatives much fasterAli Mohammad Pur
Just a little thinking outside the box, and we can now parse and optimise a million copies of "a|" chained together in just a second :^)
2022-02-20LibRegex: Make parse_disjunction() consume all disjunctions in one frameAli Mohammad Pur
This helps us not blow up when too many disjunctions are chained togther in the regex we're parsing. Fixes #12615.
2022-02-20LibRegex: Allow quantifiers after quantifiable assertionsAli Mohammad Pur
While quantifying assertions is very much meaningless, the specification allows them with annex B's extended grammar for browsers, so read and apply the quantifiers. Fixes #12373.
2022-02-20LibC: Do not write value when scanf assignment value is suppressedPeter Ross
This change has the positive side-effect of causing scanf to *segfault* when a NULL pointer argument is passed to scanf. e.g. sscanf(str, "%d", NULL);
2022-02-20LibC: Do not include suppressed assignments in scanf return valuePeter Ross
2022-02-18LibCrypto: Add curve x25519stelar7
2022-02-16LibCore+Everywhere: Return ErrorOr from ConfigFile factory methodsSam Atkins
I've attempted to handle the errors gracefully where it was clear how to do so, and simple, but a lot of this was just adding `release_value_but_fixme_should_propagate_errors()` in places.
2022-02-16LibCore+Tests: Add SeekableStream::truncate()Sam Atkins
2022-02-16AK: Fix userland parsing of rounded floating point numbersserenitydev
Parse JSON floating point literals properly, No longer throwing a SyntaxError when the decimal portion of the number exceeds the capacity of u32. Added tests to AK/TestJSON and LibJS/builtins/JSON/JSON.parse
2022-02-15AK+Kernel: OOM-harden most parts of TrieAli Mohammad Pur
The only part of Unveil that can't handle OOM gracefully is the String::formatted() use in the node metadata.
2022-02-15Tests: Add Unicode tests for CharacterType block propertiesthankyouverycool
2022-02-14LibCore+Tests: Remove Core::UDPSocket :^)sin-ack
2022-02-14LibRegex: Correct the alternative matching order when one is emptyAli Mohammad Pur
Previously we were compiling `/a|/` into what effectively would be `/|a`, which is clearly incorrect.
2022-02-14LibWeb: Fix highlighting HTML commentsKarol Kosek
Commit b193351a99 caused the HTML comments to flash when changing the text cursor. Also, when double-clicking on a comment, the selection started from the beginning of the file instead. The following message was displaying when `TOKENIZER_TRACE_DEBUG` was enabled: (Tokenizer::nth_last_position) Invalid position requested: 4th-last of 4. Returning (0-0). Changing the `nth_last_position` to 3 fixes this. I'm guessing that's because the parser is at that moment on the second hyphen of the `<!--` string, so it has to go back only by three characters.
2022-02-13LibSQL: Convert binary SQL operations to be fallibleTimothy Flynn
Now that expression evaluation can use TRY, we can allow binary operator methods to fail as well. This also fixes a few instances of converting a Value to a double when we meant to convert to an integer.
2022-02-13LibSQL: Implement converting float and tuple values to a booleanTimothy Flynn
2022-02-13Tests: Add test for LibC mkdir()Max Wipfli
2022-02-13LibWeb: Update TestHTMLTokenizer's expected token hashTimothy Flynn
The output of the tokenizer changed in commit: b193351a998dab06228bf6cb8c2b0828704839c1.
2022-02-13Tests: Wrap test-bytecode-js source in an IIFEAli Mohammad Pur
Putting everything in the global scope will lead to mayhem and failing tests with an actually correct implementation of scoping :^) Also adds in a tiny debug log of the exception, otherwise we'd be staring at failing tests with no info on what failed.
2022-02-13LibJS: Make ASTNode::generate_bytecode() fallibleAli Mohammad Pur
Instead of crashing on the spot, return a descriptive error that will eventually continue its days as a javascript "InternalError" exception. This should make random crashes with BC less likely.
2022-02-11AK: Make Bitmap construction OOM-fallibleIdan Horowitz
2022-02-10LibSQL+SQLServer: Introduce and use ResultOr<ValueType>Timothy Flynn
The result of a SQL statement execution is either: 1. An error. 2. The list of rows inserted, deleted, selected, etc. (2) is currently represented by a combination of the Result class and the ResultSet list it holds. This worked okay, but issues start to arise when trying to use Result in non-statement contexts (for example, when introducing Result to SQL expression execution). What we really need is for Result to be a thin wrapper that represents both (1) and (2), and to not have any explicit members like a ResultSet. So this commit removes ResultSet from Result, and introduces ResultOr, which is just an alias for AK::ErrorOrr. Statement execution now returns ResultOr<ResultSet> instead of Result. This further opens the door for expression execution to return ResultOr<Value> in the future. Lastly, this moves some other context held by Result over to ResultSet. This includes the row count (which is really just the size of ResultSet) and the command for which the result is for.
2022-02-10AK: Clear minimum when removing last node of RedBlackTreedavidot
2022-02-10AK: Fix RedBlackTree::find_smallest_not_below_iteratordavidot
Before this was incorrectly assuming that if the current node `n` was at least the key and the left child of `n` was below the key that `n` was always correct. However, the right child(ren) of the left child of `n` could still be at least the key. Also added some tests which produced the wrong results before this.
2022-02-10LibSQL: Do not crash when SELECTing from an empty tableTimothy Flynn
The crash was caused by getting the first element of an empty vector.
2022-02-10LibSQL+SQLServer: Move LibSQL/SQLResult.[h,cpp] to LibSQL/Result.[h,cpp]Timothy Flynn
Rename the file to match the new class name.
2022-02-10LibSQL+SQLServer: Return the new Result class from statement executionsTimothy Flynn
We can now TRY anything that returns a SQL::Result or an AK::Error.
2022-02-09LibRegex: Only skip full instructions when optimizing alternationsAli Mohammad Pur
It makes no sense to skip half of an instruction, so make sure to skip only full instructions!