Libraryless. Click here for Pure Java version (13627L/92K).
1 | concept Bla { |
2 | int a, b, c, d; |
3 | } |
4 | |
5 | concept Blubb { |
6 | int a; |
7 | } |
8 | |
9 | svoid test_lowestConceptByField() { |
10 | new Concepts cc; |
11 | indexConceptFieldDesc(cc, Bla, "a"); |
12 | indexConceptFieldDesc(cc, Bla, "c"); |
13 | Bla x = cnew(cc, Bla, a := 3, b := 3, c := 5, d := 5); |
14 | Bla y = cnew(cc, Bla, a := 5, b := 5, c := 3, d := 3); |
15 | assertEqualsVerbose(x, lowestConceptByField(cc, Bla, "a")); |
16 | assertEqualsVerbose(y, lowestConceptByField(cc, Bla, "c")); |
17 | assertEqualsVerbose(x, lowestConceptByField(cc, Bla, "b")); |
18 | assertEqualsVerbose(y, lowestConceptByField(cc, Bla, "d")); |
19 | assertEqualsVerbose(null, lowestConceptByField(cc, Blubb, "a")); |
20 | } |
Began life as a copy of #1029648
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1029657 |
Snippet name: | test_lowestConceptByField (indexed & non-indexed, OK) |
Eternal ID of this version: | #1029657/5 |
Text MD5: | ce57f0fcac4160bb8c75c94c4999f083 |
Transpilation MD5: | 690cb97e5f2638067d31422788481bdf |
Author: | stefan |
Category: | javax / concepts |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-09-04 22:12:06 |
Source code size: | 645 bytes / 20 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 174 / 255 |
Version history: | 4 change(s) |
Referenced in: | [show references] |