Skip to content

Commit

Permalink
update native values
Browse files Browse the repository at this point in the history
  • Loading branch information
deelawn committed Aug 16, 2024
1 parent b88c028 commit b6c08ce
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions gnovm/tests/imports.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,23 @@ func TestStore(rootDir, filesPath string, stdin io.Reader, stdout, stderr io.Wri
pkg.DefineGoNativeValue("Hour", time.Hour)
pkg.DefineGoNativeValue("Date", time.Date)
pkg.DefineGoNativeValue("Now", func() time.Time { return time.Unix(0, 0).UTC() }) // deterministic
pkg.DefineGoNativeValue("January", time.January)
pkg.DefineGoNativeValue("February", time.February)
pkg.DefineGoNativeValue("March", time.March)
pkg.DefineGoNativeValue("April", time.April)
pkg.DefineGoNativeValue("May", time.May)
pkg.DefineGoNativeValue("June", time.June)
pkg.DefineGoNativeValue("July", time.July)
pkg.DefineGoNativeValue("August", time.August)
pkg.DefineGoNativeValue("September", time.September)
pkg.DefineGoNativeValue("November", time.November)
pkg.DefineGoNativeValue("December", time.December)
pkg.DefineGoNativeValue("UTC", time.UTC)
pkg.DefineGoNativeValue("Unix", time.Unix)
pkg.DefineGoNativeType(reflect.TypeOf(time.Time{}))
pkg.DefineGoNativeType(reflect.TypeOf(time.Duration(0)))
pkg.DefineGoNativeType(reflect.TypeOf(time.Month(0)))
pkg.DefineGoNativeValue("LoadLocation", time.LoadLocation)
return pkg, pkg.NewPackage()
case "strings":
pkg := gno.NewPackageNode("strings", pkgPath, nil)
Expand Down

0 comments on commit b6c08ce

Please sign in to comment.