-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix my horrid math when it comes to counting items.
- Loading branch information
1 parent
646788b
commit f7773ba
Showing
4 changed files
with
34 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import {StandardStaticMapLW} from '~/standard/StandardStaticMapLW'; | ||
import {StandardStaticMapDW} from '~/standard/StandardStaticMapDW'; | ||
|
||
describe('Overall Tests for Standard', () => { | ||
it('should count the items', () => { | ||
const lws = new StandardStaticMapLW(); | ||
const dws = new StandardStaticMapDW(); | ||
const lwk = Object.keys(lws); | ||
const dwk = Object.keys(dws); | ||
|
||
let lwCount = 0; | ||
let dwCount = 0; | ||
for(const k of lwk){ | ||
lwCount = lwCount + lws[k].itemCount; | ||
} | ||
for(const k of dwk){ | ||
dwCount = dwCount + dws[k].itemCount; | ||
} | ||
console.log('lwCount', lwCount); | ||
console.log('dwCount', dwCount); | ||
console.log('total', lwCount + dwCount); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters