Skip to content

Commit 6987f95

Browse files
committed
adding tests for Comments in StructDefinition
1 parent 32affa7 commit 6987f95

2 files changed

Lines changed: 36 additions & 1 deletion

File tree

tests/format/Comments/Comments.sol

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,4 +165,17 @@ contract Comments13 {
165165
) // comment 13
166166
{
167167
}
168+
}
169+
170+
171+
172+
contract Comments14 {
173+
struct AssetStore // use 0 for non-EVM chains
174+
{
175+
uint chainId;
176+
uint assetStoreIndex;
177+
string assetStoreAddress; // we assume all addresses are strings and the front-end will cast correctly
178+
//string shortName; // usually an asset shortName `eth:` or `st:` for a stealth address
179+
}
180+
168181
}

tests/format/Comments/__snapshots__/format.test.js.snap

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
22

33
exports[`Comments.sol format 1`] = `
44
====================================options=====================================
@@ -174,6 +174,19 @@ contract Comments13 {
174174
{
175175
}
176176
}
177+
178+
179+
180+
contract Comments14 {
181+
struct AssetStore // use 0 for non-EVM chains
182+
{
183+
uint chainId;
184+
uint assetStoreIndex;
185+
string assetStoreAddress; // we assume all addresses are strings and the front-end will cast correctly
186+
//string shortName; // usually an asset shortName \`eth:\` or \`st:\` for a stealth address
187+
}
188+
189+
}
177190
=====================================output=====================================
178191
contract Comments1 {
179192
/* solhint-disable var-name-mixedcase */
@@ -378,5 +391,14 @@ contract Comments13 {
378391
{}
379392
}
380393
394+
contract Comments14 {
395+
struct AssetStore { // use 0 for non-EVM chains
396+
uint chainId;
397+
uint assetStoreIndex;
398+
string assetStoreAddress; // we assume all addresses are strings and the front-end will cast correctly
399+
}
400+
//string shortName; // usually an asset shortName \`eth:\` or \`st:\` for a stealth address
401+
}
402+
381403
================================================================================
382404
`;

0 commit comments

Comments
 (0)