1{- 2 Copyright (c) Facebook, Inc. and its affiliates. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15-} 16 17module IncludeTest where 18 19import Test.QuickCheck 20 21import IncludeTest_Types 22import IncludedTest_Types 23 24import Util 25 26propToFoo = foo == roundTrip foo 27 where foo = Foo { foo_Bar = 5, foo_Baz = 10 } 28 roundTrip = to_Foo . from_Foo 29 30propDefaultFoo = default_Foo { foo_Baz = 1 } == bar_baz default_Bar 31 32main :: IO () 33main = aggregateResults $ fmap quickCheckResult [propToFoo, propDefaultFoo] 34