about summary refs log tree commit diff
path: root/tvix/eval/src/value/attrs/tests.rs (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-09-13 r/4839 fix(tvix/eval): address current clippy lintsVincent Ambo1-4/+4
Change-Id: I5288849d0e93511b0b5664fa92f1c6882e4a1356 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6563 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2022-09-07 r/4702 feat(tvix/eval): implement NixAttrs::iter()Vincent Ambo1-0/+47
Implementing iteration over NixAttrs requires a custom iterator type in order to encapsulate the different representations. The BTreeMap for example has its own iterator type which needs to be encapsulated. This is mostly boilerplate code, but for a change some simple unit tests have been added in. Change-Id: Ie13b063241d461b810876f95f53878388e918ef2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6367 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2022-08-25 r/4481 refactor(tvix/value): ensure internal attrs representation is hiddenVincent Ambo1-3/+4
Wraps the attrs representation in an additional newtype struct with a private field in order to hide the representation from other modules. This is done in order to avoid accidental leakage of the internals outside of value::attrs. Change-Id: I68d1d02514aa0443df4c39801001a3f1f6cc5d5c Reviewed-on: https://cl.tvl.fyi/c/depot/+/6146 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2022-08-24 r/4456 test(tvix/value): add simple attrset construction testsVincent Ambo1-0/+53
These do not yet test nested attribute sets; we need to add some more inspection primitives first. Change-Id: Icfc99bf17c73ebefc0d882a84f0ca73ec688a54d Reviewed-on: https://cl.tvl.fyi/c/depot/+/6110 Reviewed-by: eta <tvl@eta.st> Tested-by: BuildkiteCI