Direct numerical simulation of two turbulent boundary layer flows has been performed. The boundary layers are both subject to a strong adverse pressure gradient. In one case a separation bubble is created while in the other the boundary layer is everywhere attached. The data from the simulations are used to investigate scaling laws near the wall, a crucial concept in turbulence models. Theoretical work concerning the inner region in a boundary layer under an adverse pressure gradient is reviewed and extended to the case of separation. Excellent agreement between theory and data from the direct numerical simulation is found in the viscous sub-layer, while a qualitative agreement is obtained for the overlap region.