+
Skip to content

Conversation

Perplex
Copy link
Contributor

@Perplex Perplex commented Oct 17, 2019

An example of a VDF with duplicate keys would be the items_game file from CSGO, it has multiple "items" keys. Here is a copy of it: https://raw.githubusercontent.com/SteamDatabase/GameTracking-CSGO/master/csgo/scripts/items/items_game.txt

This also includes a fix for the tests to be contained within the package it is testing.

@@ -1,41 +1,39 @@
package vdf_test
package vdf
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason, why the package is renamed?
We use a different package here, to be able to test only functions that are exposed and NOT to test inner behavior.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im following the Go testing conventions

To write a new test suite, create a file whose name ends _test.go that contains the TestXxx functions as described here. Put the file in the same package as the one being tested. The file will be excluded from regular package builds but will be included when the “go test” command is run. For more detail, run “go help test” and “go help testflag”.

https://golang.org/pkg/testing/

@andygrunwald
Copy link
Owner

Thank you. Looks good. Just the question about the package rename.

@andygrunwald andygrunwald merged commit 2a70eb4 into andygrunwald:master Oct 20, 2019
@andygrunwald
Copy link
Owner

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载