Lung function tests measure how well the lungs work and can help diagnose emphysema. This includes how much air the lungs can hold and how quickly air is moved into and out of the lungs. It also measures the levels of oxygen and carbon dioxide.