Skip to content

Commit

Permalink
Fixed broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Galaco committed May 10, 2021
1 parent d5b552c commit 3bc4be2
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 42 deletions.
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
Go library for handling Source Engine .bsp map files.

### Features:
* Read support for (most) non-xbox360 bsps (v20,21). v19 support limited, may work
* Read support for (most) non-xbox360 BSPs (v20,21). v19 support limited, may work
* Freely modify and resize any Lump data
* Limited write support, mostly untested

##### Not all lumps are current supported, but can be freely read and modified, as they are treated as `[]byte`
##### Not all lumps are currently supported, but can be freely read and modified, as they are treated as `[]byte`

The following lumps currently have a full implementation for v20 & v21 bsp's (tested against CS:S & CS:GO):
The following lumps currently have a full implementation for v20 & v21 BSPs (tested against CS:S & CS:GO):

```
0: Entdata
Expand Down Expand Up @@ -63,6 +63,7 @@ The following lumps currently have a full implementation for v20 & v21 bsp's (te
48: DispTris
51: LeafAmbientIndexHDR
52: LeafAmbientIndex
53: WorldLightHDR
54: WorldLightHDR
55: LeafAmbientLightingHDR
56: LeafAmbientLighting
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ go 1.12

require (
github.com/go-gl/mathgl v1.0.0
golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb // indirect
golang.org/x/image v0.0.0-20210504121937-7319ad40d33e // indirect
)
7 changes: 2 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
github.com/go-gl/mathgl v0.0.0-20190713194549-592312d8590a h1:yoAEv7yeWqfL/l9A/J5QOndXIJCldv+uuQB1DSNQbS0=
github.com/go-gl/mathgl v0.0.0-20190713194549-592312d8590a/go.mod h1:yhpkQzEiH9yPyxDUGzkmgScbaBVlhC06qodikEM0ZwQ=
github.com/go-gl/mathgl v1.0.0 h1:t9DznWJlXxxjeeKLIdovCOVJQk/GzDEL7h/h+Ro2B68=
github.com/go-gl/mathgl v1.0.0/go.mod h1:yhpkQzEiH9yPyxDUGzkmgScbaBVlhC06qodikEM0ZwQ=
golang.org/x/image v0.0.0-20190321063152-3fc05d484e9f h1:FO4MZ3N56GnxbqxGKqh+YTzUWQ2sDwtFQEZgLOxh9Jc=
golang.org/x/image v0.0.0-20190321063152-3fc05d484e9f/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a h1:gHevYm0pO4QUbwy8Dmdr01R5r1BuKtfYqRqF0h/Cbh0=
golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb h1:fqpd0EBDzlHRCjiphRR5Zo/RSWWQlWv34418dnEixWk=
golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/image v0.0.0-20210504121937-7319ad40d33e h1:PzJMNfFQx+QO9hrC1GwZ4BoPGeNGhfeQEgcQFArEjPk=
golang.org/x/image v0.0.0-20210504121937-7319ad40d33e/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
2 changes: 1 addition & 1 deletion lump_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func getExpectedLump(index int) lumps.ILump {
&lumps.Unimplemented{},
&lumps.LeafAmbientIndexHDR{},
&lumps.LeafAmbientIndex{},
&lumps.Unimplemented{},
&lumps.Lighting{},
&lumps.WorldLightHDR{},
&lumps.LeafAmbientLightingHDR{},
&lumps.LeafAmbientLighting{},
Expand Down
9 changes: 7 additions & 2 deletions primitives/game/staticpropv10_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestStaticPropV10_GetDiffuseModulation(t *testing.T) {

func TestStaticPropV10_GetDisableXBox360(t *testing.T) {
sut := getStaticPropV10()
if sut.GetDisableXBox360() != true {
if sut.GetDisableXBox360() != false {
t.Error("unexpected value for unknown property")
}

Expand Down Expand Up @@ -174,15 +174,20 @@ func TestStaticPropV10_GetUniformScale(t *testing.T) {
if sut.GetUniformScale() != 1 {
t.Error("unexpected value for uniformScale property")
}
}

func TestStaticPropV10_GetExtraFlags(t *testing.T) {
sut := getStaticPropV10()
if sut.GetExtraFlags() != 0 {
t.Error("unexpected value for extra flags property")
}
}

func TestStaticPropV10_GetUnknown(t *testing.T) {
sut := getStaticPropV10()
if sut.GetUnknown() != 0 {
t.Error("unexpected value for unknown property")
}

}

func getStaticPropV10() *StaticPropV10 {
Expand Down

0 comments on commit 3bc4be2

Please sign in to comment.