Skip to content

Commit

Permalink
Enable Struct specs on win32
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota committed Feb 18, 2020
1 parent 1048cf5 commit 48764ea
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
18 changes: 11 additions & 7 deletions spec/std/struct_spec.cr
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
require "spec"
require "big"
require "./spec_helper"
{% unless flag?(:win32) %}
require "big"
{% end %}

private module StructSpec
struct TestClass
Expand All @@ -10,12 +12,14 @@ private module StructSpec
end
end

struct BigIntWrapper
@value : BigInt
{% unless flag?(:win32) %}
struct BigIntWrapper
@value : BigInt

def initialize(@value : BigInt)
def initialize(@value : BigInt)
end
end
end
{% end %}

struct DupCloneStruct
property x, y
Expand Down Expand Up @@ -54,7 +58,7 @@ describe "Struct" do
s.hash.should eq(s.dup.hash)
end

it "does hash for struct wrapper (#1940)" do
pending_win32 "does hash for struct wrapper (#1940)" do
s = StructSpec::BigIntWrapper.new(BigInt.new(0))
s.hash.should eq(s.dup.hash)
end
Expand Down
2 changes: 1 addition & 1 deletion spec/win32_std_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ require "./std/string_pool_spec.cr"
require "./std/string_scanner_spec.cr"
require "./std/string_spec.cr"
require "./std/string/utf16_spec.cr"
# require "./std/struct_spec.cr" (failed linking)
require "./std/struct_spec.cr"
require "./std/symbol_spec.cr"
# require "./std/system/group_spec.cr" (failed codegen)
# require "./std/system_spec.cr" (failed codegen)
Expand Down

0 comments on commit 48764ea

Please sign in to comment.